* Actually set parent to null if _parent is set but couldn't be resolved in getParent().
* Use <= rather than < to test if we should recompute in getElementName() and getParent().
This commit is contained in:
parent
7a727927a9
commit
a21e6464f6
1 changed files with 5 additions and 2 deletions
|
@ -417,7 +417,7 @@ public final class Node implements INode, Serializable {
|
|||
if (isRelational()) {
|
||||
long lastmod = Math.max(lastmodified, dbmap.getLastTypeChange());
|
||||
|
||||
if ((parentHandle != null) && (lastNameCheck < lastmod)) {
|
||||
if ((parentHandle != null) && (lastNameCheck <= lastmod)) {
|
||||
try {
|
||||
Node p = parentHandle.getNode(nmgr);
|
||||
DbMapping parentmap = p.getDbMapping();
|
||||
|
@ -703,7 +703,7 @@ public final class Node implements INode, Serializable {
|
|||
ParentInfo[] parentInfo = null;
|
||||
|
||||
if (isRelational() &&
|
||||
(lastParentSet < Math.max(dbmap.getLastTypeChange(), lastmodified))) {
|
||||
(lastParentSet <= Math.max(dbmap.getLastTypeChange(), lastmodified))) {
|
||||
parentInfo = dbmap.getParentInfo();
|
||||
}
|
||||
|
||||
|
@ -756,6 +756,9 @@ public final class Node implements INode, Serializable {
|
|||
}
|
||||
} catch (Exception ignore) {
|
||||
}
|
||||
} else if (i == parentInfo.length-1) {
|
||||
setParent(null);
|
||||
lastParentSet = System.currentTimeMillis();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue