From a quick look for references I identified some other places where the @ForeignKey is not respected.
- AssociationOverride.foreignKey()
- JoinColumns.foreignKey()
- MapKeyJoinColumns.foreignKey()
- PrimaryKeyJoinColumns.foreignKey()
- PrimaryKeyJoinColumn.foreignKey()
I am personally affected by JoinColumns missing support for the foreignKey, but the deprecated hibernate @ForeignKey annotation can at least be used as a workaround for now. The JoinColumns case could be fixed by handling the JoinColumns annotation in AnnotationBinder. So this is still an issue at least for hibernate 5.0.x. I can't tell for hibernate 5.1+ but as far as I can see in the code, it should still be problematic. Please reopen @steve |