HHH-15967 @OneToOne(mappedBy = ..., fetch = LAZY) in embedded referencing an association within another embedded

This commit is contained in:
Andrea Boriero 2023-01-03 16:19:05 +01:00 committed by Yoann Rodière
parent ecde949c7f
commit a3038f94fa
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ public class EntityDelayedFetchInitializer extends AbstractFetchParentAccess imp
}
else {
if ( selectByUniqueKey ) {
final String uniqueKeyPropertyName = referencedModelPart.getBidirectionalAttributeName();
final String uniqueKeyPropertyName = referencedModelPart.getReferencedPropertyName();
final Type uniqueKeyPropertyType = ( referencedModelPart.getReferencedPropertyName() == null ) ?
concreteDescriptor.getIdentifierType() :
session.getFactory()