HHH-16258 NPE with SubselectFetch and inheritance

This commit is contained in:
Andrea Boriero 2023-03-07 12:02:39 +01:00 committed by Christian Beikov
parent 5b04d1669c
commit fffc00d614
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ public class CollectionLoaderSubSelectFetch implements CollectionLoader {
new CollectionKey( attributeMapping.getCollectionDescriptor(), key.getIdentifier() ) new CollectionKey( attributeMapping.getCollectionDescriptor(), key.getIdentifier() )
); );
if ( containedCollection != collection ) { if ( containedCollection != null && containedCollection != collection ) {
containedCollection.beginRead(); containedCollection.beginRead();
containedCollection.beforeInitialize( getLoadable().getCollectionDescriptor(), -1 ); containedCollection.beforeInitialize( getLoadable().getCollectionDescriptor(), -1 );