mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user