HHH-10314 Don't create the batch fetch queue to remove entities, as a null queue cannot contain the entity
This commit is contained in:
parent
5a0d23ea5a
commit
17b9a06d6d
|
@ -383,7 +383,9 @@ public class StatefulPersistenceContext implements PersistenceContext {
|
||||||
@Override
|
@Override
|
||||||
public void addEntity(EntityKey key, Object entity) {
|
public void addEntity(EntityKey key, Object entity) {
|
||||||
entitiesByKey.put( key, entity );
|
entitiesByKey.put( key, entity );
|
||||||
getBatchFetchQueue().removeBatchLoadableEntityKey( key );
|
if( batchFetchQueue != null ) {
|
||||||
|
getBatchFetchQueue().removeBatchLoadableEntityKey(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -409,8 +411,10 @@ public class StatefulPersistenceContext implements PersistenceContext {
|
||||||
parentsByChild.clear();
|
parentsByChild.clear();
|
||||||
entitySnapshotsByKey.remove( key );
|
entitySnapshotsByKey.remove( key );
|
||||||
nullifiableEntityKeys.remove( key );
|
nullifiableEntityKeys.remove( key );
|
||||||
getBatchFetchQueue().removeBatchLoadableEntityKey( key );
|
if( batchFetchQueue != null ) {
|
||||||
getBatchFetchQueue().removeSubselect( key );
|
getBatchFetchQueue().removeBatchLoadableEntityKey(key);
|
||||||
|
getBatchFetchQueue().removeSubselect(key);
|
||||||
|
}
|
||||||
return entity;
|
return entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue