Skip to content

Commit 7f6d14a

Browse files
committed
HHH-10247 - Fix Hibernate ignores foreign-key attribute name in hbm <many-to-many>
1 parent 310ebdd commit 7f6d14a

File tree

1 file changed

+1
-0
lines changed
  • hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm

1 file changed

+1
-0
lines changed

hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/ModelBinder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3563,6 +3563,7 @@ public Identifier determineImplicitName(final LocalMetadataBuildingContext conte
35633563
: FetchMode.JOIN
35643564
);
35653565

3566+
elementBinding.setForeignKeyName( elementSource.getExplicitForeignKeyName() );
35663567

35673568
elementBinding.setReferencedEntityName( elementSource.getReferencedEntityName() );
35683569
if ( StringHelper.isNotEmpty( elementSource.getReferencedEntityAttributeName() ) ) {

0 commit comments

Comments
 (0)