if a prototype if specified for groupby nodes, use the DbMapping
parsed by the application instead of creating a vanilla DbMapping. This makes it possible to actually define additional properties and collections on groupby nodes.
This commit is contained in:
parent
deca565254
commit
f13c73a5d1
1 changed files with 7 additions and 1 deletions
|
@ -496,6 +496,12 @@ public class DbMapping implements Updatable {
|
|||
if (subnodesRel == null || subnodesRel.groupby == null)
|
||||
return null;
|
||||
if (groupbyMapping == null) {
|
||||
// if a prototype is defined for groupby nodes, use that
|
||||
// DbMapping instead of creating a new one
|
||||
if (subnodesRel.groupbyprototype != null)
|
||||
groupbyMapping = app.getDbMapping (subnodesRel.groupbyprototype);
|
||||
// if mapping doesn' exist or isn't defined, create a new (anonymous internal) one
|
||||
if (groupbyMapping == null)
|
||||
groupbyMapping = new DbMapping ();
|
||||
groupbyMapping.subnodesRel = subnodesRel.getGroupbySubnodeRelation ();
|
||||
if (propertiesRel != null)
|
||||
|
|
Loading…
Add table
Reference in a new issue