Check if a virtual/collection/mountpoint object needs persistence when it is
created on a transient object.
This commit is contained in:
parent
ff563e677c
commit
9808820d92
1 changed files with 8 additions and 4 deletions
|
@ -1664,11 +1664,15 @@ public final class Node implements INode, Serializable {
|
||||||
// from a transient node for the first time, or when we get a collection whose
|
// from a transient node for the first time, or when we get a collection whose
|
||||||
// content objects are stored in the embedded XML data storage.
|
// content objects are stored in the embedded XML data storage.
|
||||||
if ((state == TRANSIENT) && propRel.virtual) {
|
if ((state == TRANSIENT) && propRel.virtual) {
|
||||||
INode node = new Node(propname, propRel.getPrototype(), nmgr);
|
Node pn = new Node(propname, propRel.getPrototype(), nmgr);
|
||||||
|
|
||||||
node.setDbMapping(propRel.getVirtualMapping());
|
pn.setDbMapping(propRel.getVirtualMapping());
|
||||||
setNode(propname, node);
|
if (propRel.needsPersistence()) {
|
||||||
prop = (Property) propMap.get(propname);
|
setNode(propname, pn);
|
||||||
|
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.
|
||||||
|
|
Loading…
Add table
Reference in a new issue