HHH-17205 Avoid select by unique key with no referenced property
This commit is contained in:
parent
67177fa553
commit
520538b23d
|
@ -1728,6 +1728,9 @@ public class ToOneAttributeMapping
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isSelectByUniqueKey(ForeignKeyDescriptor.Nature side) {
|
private boolean isSelectByUniqueKey(ForeignKeyDescriptor.Nature side) {
|
||||||
|
if ( referencedPropertyName == null ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if ( side == ForeignKeyDescriptor.Nature.KEY ) {
|
if ( side == ForeignKeyDescriptor.Nature.KEY ) {
|
||||||
// case 1.2
|
// case 1.2
|
||||||
return !foreignKeyDescriptor.getNavigableRole()
|
return !foreignKeyDescriptor.getNavigableRole()
|
||||||
|
|
Loading…
Reference in New Issue