Change *ToMany lazy loading to not use the parent entity/table

This commit is contained in:
Rob Bygrave
2014-01-30 22:27:52 +13:00
parent 87a948223c
commit 749f8d0d45
36 changed files with 542 additions and 190 deletions
@@ -10,11 +10,11 @@ import com.avaje.ebeaninternal.server.deploy.DbSqlContext;
public final class SqlTreeNodeManyRoot extends SqlTreeNodeBean {
public SqlTreeNodeManyRoot(String prefix, BeanPropertyAssocMany<?> prop, SqlTreeProperties props, List<SqlTreeNode> myList) {
super(prefix, prop, prop.getTargetDescriptor(), props, myList, true);
super(prefix, prop, prop.getTargetDescriptor(), props, myList, true, null);
}
@Override
protected void postLoad(DbReadContext cquery, Object loadedBean, Object id) {
protected void postLoad(DbReadContext cquery, Object loadedBean, Object id, Object lazyLoadParentId) {
// put the localBean into the manyValue so that it
// is added to the collection/map