I see recently resolved HH-8783 error about foreignkey name not used to generate constraint name like:
Code:
alter table THEME
add constraint FK_3p4vyqur9je17uaqoh1q4lheb
foreign key (SUBJECT_ID)
references THEME;
gets solved like:
Code:
alter table THEME
add constraint TEM_FK_SUBJECT
foreign key (SUBJECT_ID)
references SUBJECT;
but I see this also happens as you use annotations like:
Code:
@JoinTable(name = "THEME_LABEL",
joinColumns = {
@JoinColumn(name = "THEME_ID", nullable = false,
foreignKey = @ForeignKey(name = "TET_FK_THEME"))
},
inverseJoinColumns =
@JoinColumn(name = "LABEL_ID", nullable = false,
foreignKey = @ForeignKey(name = "TET_FK_LABEL")))
@ManyToMany(cascade = { CascadeType.MERGE, CascadeType.REMOVE },
fetch = FetchType.EAGER)
...
The generated code is:
Code:
alter table THEME_LABEL
add constraint FK_ospg6ggdu1lgg446y5dw4f3e4
foreign key (LABEL_ID)
references LABEL;
alter table THEME_LABEL
add constraint FK_3p4vyqur9je17uaqoh1q4lheb
foreign key (THEME_ID)
references THEME;
And as you can see, HHH-8783 is not fully solved, yet.