jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: XPath on data prior to saving
Date Fri, 29 Feb 2008 10:00:28 GMT
Hi Chris,

Jackrabbit does not allow you to query transient modifications, it will always 
run the query against saved *and* committed content.

as a sort of workaround you could:

- create the first part of your data in a temp location of your workspace
- call save
- create the second part and run the query with a scope that includes
   the temp location.
- create the references in the second part
- move part one of your data to the correct location (this will not
   break references because they are based on uuid and not path)
- call final save


Chris Schmidt wrote:
>   I remember seeing an email on this list about not being able to query
> for nodes prior to saving them, but cannot find it right now.  Is there
> an alternative way to query for recently created nodes/properties
> without explicitly saving the information into the repository?  I have
> two sets of information that I want to create within the same session
> 'save'.  One node needs to reference the other, but doesn't have access
> to the node itself for various reasons.  I'm attempting to do an XPath
> query to retrieve the other node to create the reference, but cannot
> since I haven't saved the previous node yet.  I don't want to save the
> first node before creating the other if at all possible.  If the second
> node fails for some reason, I don't want the first to be in the system.
> Both nodes are working with the same session object.  Is it possible to
> rollback multiple saves on a session?  That would enable me to save the
> first node but undo it if something happens with the second.  
> Thanks,
>   Chris
> The information contained in this email may be confidential and/or legally privileged.
It has been sent for the sole use of the intended recipient(s). If the reader of this message
is not an intended recipient, you are hereby notified that any unauthorized review, use, disclosure,
dissemination, distribution, or copying of this communication, or any of its contents, is
strictly prohibited. If you have received this communication in error, please contact the
sender by reply email and destroy all copies of the original message. Thank you

View raw message