HHH-17075 Lazy loading of association with non-PK referencedColumnName always yields null when bytecode enhancement is enabled

This commit is contained in:
Andrea Boriero 2023-08-16 12:15:28 +02:00 committed by Andrea Boriero
parent 8d47819f44
commit a196f0c042
1 changed files with 1 additions and 0 deletions

View File

@ -144,6 +144,7 @@ public class EntityDelayedFetchInitializer extends AbstractFetchParentAccess imp
if ( parentAccess != null
&& !parentAccess.isEmbeddableInitializer()
&& isEnhancedForLazyLoading( parentEntityInitializer ) ) {
entityInstance = LazyPropertyInitializer.UNFETCHED_PROPERTY;
return;
}
entityInstance = concreteDescriptor.loadByUniqueKey(