diff --git a/src/helma/objectmodel/db/NodeManager.java b/src/helma/objectmodel/db/NodeManager.java index f2a8d880..4c3e1c0c 100644 --- a/src/helma/objectmodel/db/NodeManager.java +++ b/src/helma/objectmodel/db/NodeManager.java @@ -443,6 +443,7 @@ public final class NodeManager { // tx.timer.beginEvent ("updateNode "+node); DbMapping dbm = node.getDbMapping (); + boolean markMappingAsUpdated = false; if (dbm == null || !dbm.isRelational ()) { db.saveNode (txn, node.getID (), node); @@ -503,6 +504,8 @@ public final class NodeManager { break; } p.dirty = false; + if (!rel.isPrivate()) + markMappingAsUpdated = true; } } else if (rel != null && rel.getDbField() != null) { @@ -522,7 +525,8 @@ public final class NodeManager { tds.close (); } catch (Exception ignore) {} } - dbm.notifyDataChange (); + if (markMappingAsUpdated) + dbm.notifyDataChange (); } // update may cause changes in the node's parent subnode array if (node.isAnonymous()) { diff --git a/src/helma/objectmodel/db/Relation.java b/src/helma/objectmodel/db/Relation.java index 57c514fa..d562e74c 100644 --- a/src/helma/objectmodel/db/Relation.java +++ b/src/helma/objectmodel/db/Relation.java @@ -53,6 +53,7 @@ public final class Relation { boolean aggressiveLoading; boolean aggressiveCaching; boolean subnodesAreProperties; + boolean isPrivate; String accessor; // db column used to access objects through this relation String order; String groupbyorder; @@ -132,13 +133,15 @@ public final class Relation { columnName = desc; reftype = PRIMITIVE; } - String rdonly = props.getProperty (desc+".readonly"); - if (rdonly != null && "true".equalsIgnoreCase (rdonly)) { - readonly = true; - } else { - readonly = false; - } } + String rdonly = props.getProperty (desc+".readonly"); + if (rdonly != null && "true".equalsIgnoreCase (rdonly)) { + readonly = true; + } else { + readonly = false; + } + isPrivate = "true".equalsIgnoreCase (props.getProperty (desc+".private")); + // the following options only apply to object and collection relations if (reftype != PRIMITIVE && reftype != INVALID) { @@ -408,6 +411,15 @@ public final class Relation { return readonly; } + /** + * Tell wether the property described by this relation is to be handled as private, i.e. + * a change on it should not result in any changed object/collection relations. + */ + public boolean isPrivate () { + return isPrivate; + } + + /** * Check if the child node fullfills the constraints defined by this relation. */