Fix for #228 - LazyLoad bug with QueryIterator. Getting EntityNotFoundException("Bean has been deleted - lazy loading failed")

This commit is contained in:
rbygrave committed 2015-01-12 20:41:37 +13:00
1 parent 961b219e3e
commit b1b9f68b7e
10 files changed
+175 -32

No files matched your search

@@ -345,7 +345,7 @@ public class SqlTreeNodeBean implements SqlTreeNode {
} else {
// create a proxy for the many (deferred fetching)
BeanCollection<?> ref = manys[i].createReferenceIfNull(localBean);
if (ref != null) {
if (ref != null && !ref.isRegisteredWithLoadContext()) {
ctx.register(manys[i].getName(), ref);
}
}