made sure node is not marked as updated in setNode unless
really necessary.
This commit is contained in:
parent
c7dc65a7ed
commit
6be5d60594
1 changed files with 5 additions and 5 deletions
|
@ -1594,14 +1594,12 @@ public final class Node implements INode, Serializable {
|
||||||
n.anonymous = false;
|
n.anonymous = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (propMap == null)
|
|
||||||
propMap = new Hashtable ();
|
|
||||||
propname = propname.trim ();
|
propname = propname.trim ();
|
||||||
String p2 = propname.toLowerCase ();
|
String p2 = propname.toLowerCase ();
|
||||||
|
|
||||||
Property prop = (Property) propMap.get (p2);
|
Property prop = propMap == null ? null : (Property) propMap.get (p2);
|
||||||
if (prop != null) {
|
if (prop != null) {
|
||||||
if (prop.type == IProperty.NODE && n.equals (prop.getNodeValue ())) {
|
if (prop.type == IProperty.NODE && n.getHandle ().equals (prop.nhandle)) {
|
||||||
// nothing to do, just clean up locks and return
|
// nothing to do, just clean up locks and return
|
||||||
if (state == CLEAN) clearWriteLock ();
|
if (state == CLEAN) clearWriteLock ();
|
||||||
if (n.state == CLEAN) n.clearWriteLock ();
|
if (n.state == CLEAN) n.clearWriteLock ();
|
||||||
|
@ -1617,7 +1615,10 @@ public final class Node implements INode, Serializable {
|
||||||
if (rel == null || rel.direction == Relation.FORWARD || rel.virtual ||
|
if (rel == null || rel.direction == Relation.FORWARD || rel.virtual ||
|
||||||
rel.other == null || !rel.other.isRelational()) {
|
rel.other == null || !rel.other.isRelational()) {
|
||||||
// the node must be stored as explicit property
|
// the node must be stored as explicit property
|
||||||
|
if (propMap == null)
|
||||||
|
propMap = new Hashtable ();
|
||||||
propMap.put (p2, prop);
|
propMap.put (p2, prop);
|
||||||
|
if (state == CLEAN) markAs (MODIFIED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rel != null && rel.direction == Relation.FORWARD && !rel.usesPrimaryKey ()) {
|
if (rel != null && rel.direction == Relation.FORWARD && !rel.usesPrimaryKey ()) {
|
||||||
|
@ -1640,7 +1641,6 @@ public final class Node implements INode, Serializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
lastmodified = System.currentTimeMillis ();
|
lastmodified = System.currentTimeMillis ();
|
||||||
if (state == CLEAN) markAs (MODIFIED);
|
|
||||||
if (n.state == DELETED) n.markAs (MODIFIED);
|
if (n.state == DELETED) n.markAs (MODIFIED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue