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 f03179345b
commit d21b5c21be
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() )
);
if ( containedCollection != collection ) {
if ( containedCollection != null && containedCollection != collection ) {
containedCollection.beginRead();
containedCollection.beforeInitialize( getLoadable().getCollectionDescriptor(), -1 );