Fix bug 241 introduced in fix of bug 230. collections/mountpoints on transient
nodes are now created as normal node properties. The check whether they need to be persistified is only done in makePersistentCapable(), i.e. when the node is actually stored.
This commit is contained in:
parent
d19d094409
commit
abbb48be8d
1 changed files with 12 additions and 8 deletions
|
@ -1668,12 +1668,8 @@ public final class Node implements INode, Serializable {
|
||||||
|
|
||||||
pn.setDbMapping(propRel.getVirtualMapping());
|
pn.setDbMapping(propRel.getVirtualMapping());
|
||||||
pn.setParent(this);
|
pn.setParent(this);
|
||||||
if (propRel.needsPersistence()) {
|
setNode(propname, pn);
|
||||||
setNode(propname, pn);
|
prop = (Property) propMap.get(propname);
|
||||||
prop = (Property) propMap.get(propname);
|
|
||||||
} else {
|
|
||||||
prop = new Property(propname, this, pn);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// if this is from relational database only fetch if this node
|
// if this is from relational database only fetch if this node
|
||||||
// is itself persistent.
|
// is itself persistent.
|
||||||
|
@ -2408,6 +2404,14 @@ public final class Node implements INode, Serializable {
|
||||||
IProperty next = get((String) e.nextElement());
|
IProperty next = get((String) e.nextElement());
|
||||||
|
|
||||||
if ((next != null) && (next.getType() == IProperty.NODE)) {
|
if ((next != null) && (next.getType() == IProperty.NODE)) {
|
||||||
|
// check if this property actually needs to be persisted.
|
||||||
|
if (dbmap != null) {
|
||||||
|
Relation rel = dbmap.getExactPropertyRelation(next.getName());
|
||||||
|
if (rel != null && !rel.needsPersistence()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Node n = (Node) next.getNodeValue();
|
Node n = (Node) next.getNodeValue();
|
||||||
|
|
||||||
if ((n != null) && (n.state == TRANSIENT)) {
|
if ((n != null) && (n.state == TRANSIENT)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue