Suggested fix

(cherry picked from commit 52ca271a13)
This commit is contained in:
Noemi Szemenyei
2022-03-15 13:21:02 +01:00
parent 8ad8f47c6b
commit 826b507b77
@@ -190,7 +190,7 @@ final class DLoadBeanContext extends DLoadBaseContext implements LoadBeanContext
// lazy load property was a Many
return;
}
if (list.isEmpty()) {
if (!list.contains(ebi)) {
// re-add to the batch and lazy load from DB skipping l2 cache
list.add(ebi);
} else if (context.hitCache) {