Hi everybody,
am I correct in the assumption, that I cannot currently name the foreign_key on a mapkey_id?
For example I have this mapping
Code:
@ManyToMany(cascade = CascadeType.ALL)
@ForeignKey(name = "fk_role_privilege_role", inverseName = "fk_role_privilege_privilege")
Map<Privilege, PrivilegeConstraint<?>> privs =
new HashMap<Privilege, PrivilegeConstraint<?>>();
creating this table and foreign keys
Code:
CREATE TABLE "RAIL"."AC_ROLE_PRIVILEGECONSTRAINT"
( "AC_ROLE_ID" NUMBER(19,0) NOT NULL ENABLE,
"PRIVS_ID" NUMBER(19,0) NOT NULL ENABLE,
"MAPKEY_ID" NUMBER(19,0) NOT NULL ENABLE,
PRIMARY KEY ("AC_ROLE_ID", "MAPKEY_ID") ENABLE,
CONSTRAINT "FKEC400F82AB02DCF8" FOREIGN KEY ("MAPKEY_ID")
REFERENCES "RAIL"."AC_PRIVILEGE" ("ID") ENABLE,
CONSTRAINT "FK_ROLE_PRIVILEGE_ROLE" FOREIGN KEY ("AC_ROLE_ID")
REFERENCES "RAIL"."AC_ROLE" ("ID") ENABLE,
CONSTRAINT "FK_ROLE_PRIVILEGE_PRIVILEGE" FOREIGN KEY ("PRIVS_ID")
REFERENCES "RAIL"."PRIVILEGECONSTRAINT" ("ID") ENABLE
) ;
As one might imagine, I am not to happy about this foreign key name.
FKEC400F82AB02DCF8
Is there any way to change it in to something meaningfull?
kind regards
Jens