* Set parent on group nodes for transient parents. Fixes NullPointerException

in Relation.setConstraints().
This commit is contained in:
hns 2008-04-07 19:50:57 +00:00
parent ae3c331c7d
commit 44c0745954

View file

@ -1241,9 +1241,13 @@ public final class Node implements INode, Serializable {
boolean relational = groupbyMapping.getSubnodeMapping().isRelational();
if (relational || create) {
Node node = relational && persistent ?
new Node(this, sid, nmgr, null) :
new Node(sid, null, nmgr);
Node node;
if (relational && persistent) {
node = new Node(this, sid, nmgr, null);
} else {
node = new Node(sid, null, nmgr);
node.setParent(this);
}
// set "groupname" property to value of groupby field
node.setString("groupname", sid);