Yigal Duppen <[EMAIL PROTECTED]> wrote:
> I would like to inspect the contents of an org.mmbase.bridge.Transaction 
> object before committing it; however, I can't figure out how to do that.
> 
> The following code illustrates what I'd like to do:
> 
> // create transaction
> Transaction t = MY_CLOUD.createTransaction();
> 
> // create new node using that transaction
> Node n = t.getNodeManager(MY_BUILDER).createNode();
> n.setStringValue(MY_FIELD, MY_VALUE);
> n.commit();
> 
> // inspect contents 
> System.err.println(t.getNodeManager(MY_BUILDER).getList(null, null, null));
> 
> // not what I want, discard changes
> t.cancel();
> 
> 
> I'd like to see the println only showing the node created in the fourth line 
> of code.  However, the println only shows the nodes already in the 
> database. 
> Do I want something impossible? If not, what should I do?


Perhaps the simples way is to simply keep track of the nodes seperately?
Set myNodes = new HashSet();

myNodes.add(n);

etc etc.

Inspect contents:

out.println(myNodes);



Michiel

-- 
Michiel Meeuwissen 
Mediapark C101 Hilversum  
+31 (0)35 6772979
nl_NL, eo, en_US
mihxil'
[]()

Reply via email to