Skip to content

Commit c0528b7

Browse files
committed
HHH-10247 - Fix Hibernate ignores foreign-key attribute name in hbm <many-to-many>
1 parent 8c0c98f commit c0528b7

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
@@ -3570,6 +3570,7 @@ public Identifier determineImplicitName(final LocalMetadataBuildingContext conte
35703570
: FetchMode.JOIN
35713571
);
35723572

3573+
elementBinding.setForeignKeyName( elementSource.getExplicitForeignKeyName() );
35733574

35743575
elementBinding.setReferencedEntityName( elementSource.getReferencedEntityName() );
35753576
if ( StringHelper.isNotEmpty( elementSource.getReferencedEntityAttributeName() ) ) {

0 commit comments

Comments
 (0)