Hi, On 9/1/06, Nicolas <[EMAIL PROTECTED]> wrote:
Try a session.save() please
It's the equivalent to a save() on the parent node in this case. Something that Christophe doesn't want to do.
On 9/1/06, Ducrocq Christophe <[EMAIL PROTECTED]> wrote: > But, I do parent.save(), I save all children of parent. (What does not > interest me) > > On which node has to call upon the method save() ? > How then I to make to solve my problems?
One solution that was discussed earlier was to have a separate "staging" node where you create and save the new node, and then use Workspace.move() it to the correct location. Workspace.move() is immediately persisted without a need to call save(), so it avoids your problem. On a related note, I think it might make sense to implement a feature in Jackrabbit that allows you to do the following: Node parent = Session.getRootNode().getNode(...); Node child = parent.addNode(...); child.save(); Feel free to file a Jira feature request for that if you like. Patches are also welcome (warning: requires diving deep into Jackrabbit internals). BR, Jukka Zitting -- Yukatan - http://yukatan.fi/ - [EMAIL PROTECTED] Software craftsmanship, JCR consulting, and Java development
