Register child object with synthetic key in node manager when adding to a collection with

accessname set.
This commit is contained in:
hns 2004-11-09 22:30:26 +00:00
parent ba42d67be6
commit f042bbd36a
2 changed files with 17 additions and 2 deletions

View file

@ -924,6 +924,13 @@ public final class Node implements INode, Serializable {
old.remove();
this.removeNode(old);
}
if (state != TRANSIENT) {
Transactor tx = (Transactor) Thread.currentThread();
SyntheticKey key = new SyntheticKey(this.getKey(), prop);
tx.visitCleanNode(key, node);
nmgr.registerNode(node, key);
}
}
}
}
@ -2301,8 +2308,7 @@ public final class Node implements INode, Serializable {
// if the field is not the primary key of the property, also register it
if ((rel != null) && (rel.accessName != null) && (state != TRANSIENT)) {
Key secKey = new SyntheticKey(getKey(), propname);
nmgr.evictKey(secKey);
nmgr.registerNode(n, secKey);
tx.visitCleanNode(secKey, n);
}
}

View file

@ -205,6 +205,15 @@ public final class WrappedNodeManager {
nmgr.registerNode(node);
}
/**
*
*
* @param node ...
*/
public void registerNode(Node node, Key key) {
nmgr.registerNode(node, key);
}
/**
*
*