|
13 | 13 |
|
14 | 14 | import org.hibernate.LockMode;
|
15 | 15 | import org.hibernate.LockOptions;
|
16 |
| -import org.hibernate.engine.internal.BatchFetchQueueHelper; |
17 | 16 | import org.hibernate.engine.spi.BatchFetchQueue;
|
18 | 17 | import org.hibernate.engine.spi.EntityEntry;
|
19 | 18 | import org.hibernate.engine.spi.EntityKey;
|
@@ -206,7 +205,7 @@ protected <K> CompletionStage<List<E>> performOrderedMultiLoad(
|
206 | 205 | // the element value at this position in the result List should be
|
207 | 206 | // the EntityKey for that entity - reuse it
|
208 | 207 | final EntityKey entityKey = (EntityKey) result.get( resultIndex );
|
209 |
| - BatchFetchQueueHelper.removeBatchLoadableEntityKey( entityKey, session ); |
| 208 | + session.getPersistenceContextInternal().getBatchFetchQueue().removeBatchLoadableEntityKey( entityKey ); |
210 | 209 | Object entity = persistenceContext.getEntity( entityKey );
|
211 | 210 | if ( entity != null && !loadOptions.isReturnOfDeletedEntitiesEnabled() ) {
|
212 | 211 | // make sure it is not DELETED
|
@@ -293,7 +292,8 @@ protected <K> CompletionStage<List<E>> performUnorderedMultiLoad(
|
293 | 292 | continue;
|
294 | 293 | }
|
295 | 294 | // found or not, remove the key from the batch-fetch queue
|
296 |
| - BatchFetchQueueHelper.removeBatchLoadableEntityKey( id, getLoadable(), session ); |
| 295 | + session.getPersistenceContextInternal().getBatchFetchQueue() |
| 296 | + .removeBatchLoadableEntityKey( session.generateEntityKey( id, getLoadable().getEntityPersister() ) ); |
297 | 297 | }
|
298 | 298 |
|
299 | 299 | return result;
|
|
0 commit comments