Fix NPE with DelayedCollectionInitializer
This commit is contained in:
parent
711fb53505
commit
f7d421b6ff
|
@ -51,8 +51,6 @@ public abstract class AbstractCollectionInitializer implements CollectionInitial
|
|||
collectionAttributeMapping.getCollectionDescriptor(),
|
||||
parentKey
|
||||
);
|
||||
|
||||
parentAccess.registerResolutionListener( owner -> collectionInstance.setOwner( owner ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ package org.hibernate.sql.results.graph.collection.internal;
|
|||
|
||||
import org.hibernate.collection.spi.CollectionSemantics;
|
||||
import org.hibernate.collection.spi.PersistentCollection;
|
||||
import org.hibernate.engine.spi.CollectionKey;
|
||||
import org.hibernate.engine.spi.PersistenceContext;
|
||||
import org.hibernate.engine.spi.SharedSessionContractImplementor;
|
||||
import org.hibernate.internal.log.LoggingHelper;
|
||||
|
@ -96,19 +95,4 @@ public class DelayedCollectionInitializer extends AbstractCollectionInitializer
|
|||
collectionInstance = null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolveKey(RowProcessingState rowProcessingState) {
|
||||
if ( collectionKey != null ) {
|
||||
// already resolved
|
||||
return;
|
||||
}
|
||||
|
||||
final Object parentKey = parentAccess.getParentKey();
|
||||
if ( parentKey != null ) {
|
||||
collectionKey = new CollectionKey(
|
||||
collectionAttributeMapping.getCollectionDescriptor(),
|
||||
parentKey
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue