HHH-11147 Avoid allocating a BatchFetchQueue if batching was not enabled
This commit is contained in:
parent
5d0d134df3
commit
6aebd26167
|
@ -292,8 +292,10 @@ public class DefaultLoadEventListener implements LoadEventListener {
|
|||
}
|
||||
}
|
||||
|
||||
// Potentially add a batch-fetch entry into the queue for this entity
|
||||
persistenceContext.getBatchFetchQueue().addBatchLoadableEntityKey( keyToLoad );
|
||||
if ( keyToLoad.isBatchLoadable() ) {
|
||||
// Add a batch-fetch entry into the queue for this entity
|
||||
persistenceContext.getBatchFetchQueue().addBatchLoadableEntityKey( keyToLoad );
|
||||
}
|
||||
|
||||
// This is the crux of HHH-11147
|
||||
// create the (uninitialized) entity instance - has only id set
|
||||
|
|
Loading…
Reference in New Issue