Merge from helma_1_5 branch:

* Do parent lookup for transient nodes in Node.getParent(), but omit warning message if it fails.
This commit is contained in:
hns 2006-11-23 13:49:41 +00:00
parent f1bb105b54
commit f249f893c5

View file

@ -755,8 +755,7 @@ public final class Node implements INode, Serializable {
// check what's specified in the type.properties for this node. // check what's specified in the type.properties for this node.
ParentInfo[] parentInfo = null; ParentInfo[] parentInfo = null;
if (isRelational() && state != TRANSIENT if (isRelational() && lastParentSet <= Math.max(dbmap.getLastTypeChange(), lastmodified)) {
&& lastParentSet <= Math.max(dbmap.getLastTypeChange(), lastmodified)) {
parentInfo = dbmap.getParentInfo(); parentInfo = dbmap.getParentInfo();
} }
@ -820,7 +819,7 @@ public final class Node implements INode, Serializable {
lastParentSet = System.currentTimeMillis(); lastParentSet = System.currentTimeMillis();
} }
} }
if (parentHandle == null && !nmgr.isRootNode(this)) { if (parentHandle == null && !nmgr.isRootNode(this) && state != TRANSIENT) {
nmgr.nmgr.app.logEvent("*** Couldn't resolve parent for " + this); nmgr.nmgr.app.logEvent("*** Couldn't resolve parent for " + this);
nmgr.nmgr.app.logEvent("*** Please check _parent info in type.properties!"); nmgr.nmgr.app.logEvent("*** Please check _parent info in type.properties!");
} }