#2178 - Fix for duplicate instances added to collection for nested one-to-many fetch

This is an initial fix for this case.
This commit is contained in:
Robin Bygrave
2021-03-01 13:38:40 +13:00
parent 6897e06dcd
commit 6acf93c978
@@ -36,7 +36,7 @@ final class SqlTreeNodeManyRoot extends SqlTreeNodeBean {
EntityBean detailBean = super.load(cquery, null, null);
// initialise the collection and add detailBean if it is not null
if (contextParent != null) {
manyProp.addBeanToCollectionWithCreate(contextParent, detailBean, false);
manyProp.addBeanToCollectionWithCreate(contextParent, detailBean, true);
}
return detailBean;
}