* Always include local subnode version in lastSubnodeChange checksum.

Fixes bug 567 <http://helma.org/bugs/show_bug.cgi?id=567>
This commit is contained in:
hns 2007-11-26 12:45:38 +00:00
parent ad635a3cf7
commit 61b41e098a

View file

@ -1199,7 +1199,8 @@ public final class Node implements INode, Serializable {
retval = nhandle.getNode(nmgr); retval = nhandle.getNode(nmgr);
} }
// This would be an alternative way to do it, without loading the subnodes: // This would be an alternative way to do it, without loading the subnodes,
// but it currently isn't supported by NodeManager.
// if (dbmap != null && dbmap.getSubnodeRelation () != null) // if (dbmap != null && dbmap.getSubnodeRelation () != null)
// retval = nmgr.getNode (this, subid, dbmap.getSubnodeRelation ()); // retval = nmgr.getNode (this, subid, dbmap.getSubnodeRelation ());
if ((retval != null) && (retval.parentHandle == null) && if ((retval != null) && (retval.parentHandle == null) &&
@ -1622,9 +1623,9 @@ public final class Node implements INode, Serializable {
*/ */
long getLastSubnodeChange(Relation subRel) { long getLastSubnodeChange(Relation subRel) {
// include dbmap.getLastTypeChange to also reload if the type mapping has changed. // include dbmap.getLastTypeChange to also reload if the type mapping has changed.
long checkSum = lastSubnodeChange + dbmap.getLastTypeChange();
return subRel.aggressiveCaching ? return subRel.aggressiveCaching ?
lastSubnodeChange + dbmap.getLastTypeChange() : checkSum : checkSum + subRel.otherType.getLastDataChange();
subRel.otherType.getLastDataChange() + dbmap.getLastTypeChange();
} }
/** /**