Hi Marcel,

I just verified your assumption: You were absolutely right. I was not aware that the XPath queries only run against committed results. Because my #dump() returned all expected nodes right before I issued the XPath query I thought it would also take these nodes into account. Thanks a lot to all for your help, especially to you, Marcel!

Bye,

Daniel

Marcel Reutegger wrote:
Hi Daniel,

ah, now I'm starting to realize what happens. You are using spring modules, which probably wraps a transaction around your code. because queries are only run against *committed* content it may happen that you won't see results even though you saved (but not yet committed) changes. this is somewhat counter intuitive and has been debated on this list a while ago. JSR 283 will be more flexible in this respect.

can you please make sure you commit the transaction before you execute the query? that will probably solve your issue.

regards
 marcel


Reply via email to