-
Bug
-
Resolution: Done
-
Major
-
3.7.2.Final
-
None
When trying to use Session.move(srcPath, destPath) when destPath exists, we must remove the node in destPath first. However, even after performing a Session.removeItem(destPath), Session.move still fails with the following exception:
javax.jcr.ItemExistsException: A node definition that allows same name siblings could not be found for the node "/parent/name2[2]" in workspace "default" at org.modeshape.jcr.AbstractJcrNode.validateChildNodeDefinition(AbstractJcrNode.java:1323) at org.modeshape.jcr.JcrSession.move(JcrSession.java:1037)
The problem only occurs if the parent node does not allow same name siblings.
This effectively means it is not possible to implement behaviour to move and overwrite the destination node within one session.