HHH-18598 Determine uniqueness from JoinColumn for inverseJoinColumns

This commit is contained in:
Erdem A Memisyazici 2024-09-12 13:03:52 -04:00
parent 4bd164222f
commit 4deb2d9342
No known key found for this signature in database
GPG Key ID: 9D0AE134AC90ABD2
1 changed files with 2 additions and 1 deletions

View File

@ -2190,8 +2190,9 @@ public abstract class CollectionBinder {
bindCollectionSecondPass( targetEntity, joinColumns );
if ( isCollectionOfEntities ) {
final AnnotatedJoinColumn firstInverseJoinColumn = inverseJoinColumns.getJoinColumns().get(0);
final ManyToOne element = handleCollectionOfEntities( elementType, targetEntity, hqlOrderBy );
bindManyToManyInverseForeignKey( targetEntity, inverseJoinColumns, element, oneToMany );
bindManyToManyInverseForeignKey( targetEntity, inverseJoinColumns, element, firstInverseJoinColumn.isUnique() );
}
else if ( isManyToAny ) {
handleManyToAny();