#592 - Fetched empty collection of null child of parent entity

This commit is contained in:
Robin Bygrave committed 2016-03-14 20:10:07 +13:00
1 parent b99f002968
commit 0ca4f92b26
5 files changed
+198 -1

No files matched your search

@@ -24,7 +24,9 @@ public final class SqlTreeNodeManyRoot extends SqlTreeNodeBean {
// being set to the parentBean directly
EntityBean detailBean = super.load(cquery, null, null);
// initialise the collection and add detailBean if it is not null
manyProp.addBeanToCollectionWithCreate(contextParent, detailBean, false);
if (contextParent != null) {
manyProp.addBeanToCollectionWithCreate(contextParent, detailBean, false);
}
return detailBean;
}