mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-15 07:34:57 +00:00
Fix NPE with DelayedCollectionInitializer
This commit is contained in:
parent
711fb53505
commit
f7d421b6ff
@ -51,8 +51,6 @@ public void resolveKey(RowProcessingState rowProcessingState) {
|
||||
collectionAttributeMapping.getCollectionDescriptor(),
|
||||
parentKey
|
||||
);
|
||||
|
||||
parentAccess.registerResolutionListener( owner -> collectionInstance.setOwner( owner ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
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 void finishUpRow(RowProcessingState rowProcessingState) {
|
||||
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…
x
Reference in New Issue
Block a user