Ok, but a method session.save() save all modifications on the tansient storage and not a particular child of transient
Christophe -----Message d'origine----- De : Nicolas [mailto:[EMAIL PROTECTED] Envoyé : vendredi 1 septembre 2006 15:23 À : [email protected] Objet : Re: question about save Node Hi, Try a session.save() please On 9/1/06, Ducrocq Christophe <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm a parent which contains more children. I want to save a child who > cans potentially a new child, without to safeguard all the children > associated with the parent. > > I tested with a method save() on a Item : > > Sample: > Node parent = root.getNode("hello"); > Node child_1 = parent.getNode("world"); > Child_1.setProperty("message","hello world"); > > > Node child_2 = parend.addNode("newNode"); > child_2.setProperty("message","test"); > > If I do child_1.save(), I'm a javax.jcr.RepositoryException: > javax.jcr.RepositoryException: /hello/newNode: cannot save a new item. > at > org.apache.jackrabbit.core.ItemImpl.getTransientStates(ItemImpl.java:335 > ) > at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1054) > at > net.atos.wl.fwk.rules.repository.TestJsr.main(TestJsr.java:52) > > 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? > > Tank you for your responses, > > Regards, > > Christophe > > > > > > > -- a+ Nico my blog! http://www.deviant-abstraction.net !!
