HHH-16258 NPE with SubselectFetch and inheritance
This commit is contained in:
parent
f03179345b
commit
d21b5c21be
|
@ -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 );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue