Fix bug in previous commit: Make children persistable before setting
collection/mountpoint to virtual, otherwise children will be lost.
This commit is contained in:
parent
d1a7cd1463
commit
2015aeef89
1 changed files with 1 additions and 1 deletions
|
@ -2400,6 +2400,7 @@ public final class Node implements INode, Serializable {
|
||||||
if (dbmap != null) {
|
if (dbmap != null) {
|
||||||
Relation rel = dbmap.getExactPropertyRelation(next.getName());
|
Relation rel = dbmap.getExactPropertyRelation(next.getName());
|
||||||
if (rel != null && rel.isVirtual() && !rel.needsPersistence()) {
|
if (rel != null && rel.isVirtual() && !rel.needsPersistence()) {
|
||||||
|
n.makeChildrenPersistable();
|
||||||
// make this a virtual node. what we do is basically to
|
// make this a virtual node. what we do is basically to
|
||||||
// replay the things done in the constructor for virtual nodes.
|
// replay the things done in the constructor for virtual nodes.
|
||||||
// NOTE: setting the primaryKey may not be necessary since this
|
// NOTE: setting the primaryKey may not be necessary since this
|
||||||
|
@ -2408,7 +2409,6 @@ public final class Node implements INode, Serializable {
|
||||||
n.setState(VIRTUAL);
|
n.setState(VIRTUAL);
|
||||||
n.primaryKey = new SyntheticKey(getKey(), propname);
|
n.primaryKey = new SyntheticKey(getKey(), propname);
|
||||||
n.id = propname;
|
n.id = propname;
|
||||||
n.makeChildrenPersistable();
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue