HHH-16970 Fix owner access for eager collection initializer

This commit is contained in:
Marco Belladelli 2023-08-08 12:53:41 +02:00 committed by Christian Beikov
parent 7170be02db
commit 392d539c8c
1 changed files with 5 additions and 2 deletions

View File

@ -212,8 +212,11 @@ public abstract class AbstractImmediateCollectionInitializer extends AbstractCol
); );
} }
if ( getParentAccess() != null ) { final FetchParentAccess entityParentAccess = getParentAccess() != null ?
getParentAccess().registerResolutionListener( getParentAccess().findFirstEntityDescriptorAccess() :
null;
if ( entityParentAccess != null ) {
entityParentAccess.registerResolutionListener(
owner -> collectionInstance.setOwner( owner ) owner -> collectionInstance.setOwner( owner )
); );
} }