mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-18 14:58:47 +00:00
#703 - Refactor - When batch lazy loading hits the L2 bean cache and misses initially, it checks that initial bean again (and should skip the second attempt)
This commit is contained in:
1 parent
0e5859716b
commit
e344b5c0a1
1 file changed
+3
-1
@@ -185,7 +185,9 @@ public class DLoadBeanContext extends DLoadBaseContext implements LoadBeanContex
|
||||
// check each of the beans in the batch to see if they are in the L2 cache.
|
||||
Iterator<EntityBeanIntercept> iterator = list.iterator();
|
||||
while (iterator.hasNext()) {
|
||||
if (context.desc.cacheBeanLoad(iterator.next(), persistenceContext)) {
|
||||
EntityBeanIntercept batchEbi = iterator.next();
|
||||
if (batchEbi != ebi && context.desc.cacheBeanLoad(batchEbi, persistenceContext)) {
|
||||
// bean successfully loaded from L2 cache so remove from batch load
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user