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
|
||||
// content objects are stored in the embedded XML data storage.
|
||||
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());
|
||||
setNode(propname, node);
|
||||
prop = (Property) propMap.get(propname);
|
||||
pn.setDbMapping(propRel.getVirtualMapping());
|
||||
if (propRel.needsPersistence()) {
|
||||
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
|
||||
// is itself persistent.
|
||||
|
|
Loading…
Add table
Reference in a new issue