use proper mapping for collections on transient nodes
This commit is contained in:
parent
b21d575fdf
commit
d3bc403bd4
1 changed files with 8 additions and 6 deletions
|
@ -48,8 +48,10 @@ public class TransientNode implements INode, Serializable {
|
||||||
|
|
||||||
private static long idgen = 0;
|
private static long idgen = 0;
|
||||||
|
|
||||||
public String generateID () {
|
public static String generateID () {
|
||||||
return "t"+idgen++; // make transient ids differ from persistent ones
|
// make transient ids differ from persistent ones
|
||||||
|
// and are unique within on runtime session
|
||||||
|
return "t"+idgen++;
|
||||||
}
|
}
|
||||||
|
|
||||||
public TransientNode () {
|
public TransientNode () {
|
||||||
|
@ -388,10 +390,10 @@ public class TransientNode implements INode, Serializable {
|
||||||
INode node = new helma.objectmodel.db.Node (rel.getPropName (), rel.getPrototype (), dbmap.getWrappedNodeManager());
|
INode node = new helma.objectmodel.db.Node (rel.getPropName (), rel.getPrototype (), dbmap.getWrappedNodeManager());
|
||||||
// node.setState (TRANSIENT);
|
// node.setState (TRANSIENT);
|
||||||
// make a db mapping good enough that the virtual node finds its subnodes
|
// make a db mapping good enough that the virtual node finds its subnodes
|
||||||
DbMapping dbm = new DbMapping ();
|
// DbMapping dbm = new DbMapping ();
|
||||||
dbm.setSubnodeRelation (rel);
|
// dbm.setSubnodeRelation (rel);
|
||||||
dbm.setPropertyRelation (rel);
|
// dbm.setPropertyRelation (rel);
|
||||||
node.setDbMapping (dbm);
|
node.setDbMapping (rel.getVirtualMapping ());
|
||||||
setNode (propname, node);
|
setNode (propname, node);
|
||||||
return (Property) propMap.get (propname);
|
return (Property) propMap.get (propname);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue