Hibernate version: 3.0.2
Basically, in a table which's a many-to-many bridge, I have the following SQL generated by SchemaExport:
Code:
create table accounts_privileges_bridge (
accountID bigint not null,
privilegeID bigint not null,
primary key (accountID, privilegeID)
)
# cool so far
# now the ones I'm concerned about
alter table accounts_privileges_bridge add index FKE93B366D1EEAC239 (accountID), add constraint FKE93B366D1EEAC239 foreign key (accountID) references accounts (ID)
alter table accounts_privileges_bridge add index FKE93B366DACC5170C (privilegeID), add constraint FKE93B366DACC5170C foreign key (privilegeID) references account_privileges (ID)
so basically, the alter table statements try to add another index onto those keys, with the exception that this time they specify "foreign key".
Is this the way it's meant to be? having 4 indexes in that table of 2 rows?