mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 16:44:57 +00:00
HHH-11147 Avoid allocating a BatchFetchQueue if batching was not enabled
This commit is contained in:
parent
d968b0a3a5
commit
4bd5ca85da
@ -313,8 +313,10 @@ private Object proxyOrLoad(
|
||||
}
|
||||
}
|
||||
|
||||
// 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…
x
Reference in New Issue
Block a user