* 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:
hns 2004-03-09 16:36:21 +00:00
parent 7a727927a9
commit a21e6464f6

View file

@ -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();
}
}
}