HHH-18598 Determine uniqueness from JoinColumn for inverseJoinColumns
This commit is contained in:
parent
4bd164222f
commit
4deb2d9342
|
@ -2190,8 +2190,9 @@ public abstract class CollectionBinder {
|
||||||
bindCollectionSecondPass( targetEntity, joinColumns );
|
bindCollectionSecondPass( targetEntity, joinColumns );
|
||||||
|
|
||||||
if ( isCollectionOfEntities ) {
|
if ( isCollectionOfEntities ) {
|
||||||
|
final AnnotatedJoinColumn firstInverseJoinColumn = inverseJoinColumns.getJoinColumns().get(0);
|
||||||
final ManyToOne element = handleCollectionOfEntities( elementType, targetEntity, hqlOrderBy );
|
final ManyToOne element = handleCollectionOfEntities( elementType, targetEntity, hqlOrderBy );
|
||||||
bindManyToManyInverseForeignKey( targetEntity, inverseJoinColumns, element, oneToMany );
|
bindManyToManyInverseForeignKey( targetEntity, inverseJoinColumns, element, firstInverseJoinColumn.isUnique() );
|
||||||
}
|
}
|
||||||
else if ( isManyToAny ) {
|
else if ( isManyToAny ) {
|
||||||
handleManyToAny();
|
handleManyToAny();
|
||||||
|
|
Loading…
Reference in New Issue