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