mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#592 - Fetched empty collection of null child of parent entity
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user