removed the check that prevented transient
nodes from obtaining virtual collection nodes.
This commit is contained in:
parent
fd9691084e
commit
6e65ecd242
1 changed files with 19 additions and 27 deletions
|
@ -1225,39 +1225,31 @@ public final class Node implements INode, Serializable {
|
||||||
|
|
||||||
// the property does not exist in our propmap - see if we can create it on the fly,
|
// the property does not exist in our propmap - see if we can create it on the fly,
|
||||||
// either because it is mapped from a relational database or defined as virtual node
|
// either because it is mapped from a relational database or defined as virtual node
|
||||||
if (prop == null && dbmap != null && state != TRANSIENT && state != NEW) {
|
if (prop == null && dbmap != null) {
|
||||||
Relation prel = dbmap.getPropertyRelation (propname);
|
Relation prel = dbmap.getPropertyRelation (propname);
|
||||||
Relation srel = dbmap.getSubnodeRelation ();
|
Relation srel = dbmap.getSubnodeRelation ();
|
||||||
/* if (prel != null && prel.virtual && prel.otherType != null && !prel.otherType.isRelational ()) {
|
if (prel == null && srel != null && srel.groupby != null)
|
||||||
Node pn = (Node) createNode (propname);
|
prel = srel;
|
||||||
if (prel.prototype != null) {
|
if (prel == null)
|
||||||
pn.setPrototype (prel.prototype);
|
prel = dbmap.getPropertyRelation ();
|
||||||
}
|
if (prel != null && (prel.accessor != null || prel.virtual || prel.groupby != null)) {
|
||||||
prop = (Property) propMap.get (propname);
|
// this may be a relational node stored by property name
|
||||||
|
try {
|
||||||
} else { */
|
Node pn = nmgr.getNode (this, propname, prel);
|
||||||
if (prel == null && srel != null && srel.groupby != null)
|
if (pn != null) {
|
||||||
prel = srel;
|
if (pn.parentHandle == null && !"root".equalsIgnoreCase (pn.getPrototype ())) {
|
||||||
if (prel == null)
|
pn.setParent (this);
|
||||||
prel = dbmap.getPropertyRelation ();
|
pn.name = propname;
|
||||||
if (prel != null && (prel.accessor != null || prel.virtual || prel.groupby != null)) {
|
pn.anonymous = false;
|
||||||
// this may be a relational node stored by property name
|
|
||||||
try {
|
|
||||||
Node pn = nmgr.getNode (this, propname, prel);
|
|
||||||
if (pn != null) {
|
|
||||||
if (pn.parentHandle == null && !"root".equalsIgnoreCase (pn.getPrototype ())) {
|
|
||||||
pn.setParent (this);
|
|
||||||
pn.name = propname;
|
|
||||||
pn.anonymous = false;
|
|
||||||
}
|
|
||||||
prop = new Property (propname, this, pn);
|
|
||||||
}
|
}
|
||||||
} catch (RuntimeException nonode) {
|
prop = new Property (propname, this, pn);
|
||||||
// wasn't a node after all
|
|
||||||
}
|
}
|
||||||
|
} catch (RuntimeException nonode) {
|
||||||
|
// wasn't a node after all
|
||||||
}
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prop == null && inherit && getParent () != null && state != TRANSIENT) {
|
if (prop == null && inherit && getParent () != null && state != TRANSIENT) {
|
||||||
prop = ((Node) getParent ()).getProperty (propname, inherit);
|
prop = ((Node) getParent ()).getProperty (propname, inherit);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue