On 6.2.13 20:43, Jukka Zitting wrote:
The above rationale would imply that in Oak is to make sure that all
session refreshes and transient moves should trigger re-evaluation of
the the paths of referenceable nodes and those with a referenceable
ancestor. Other nodes should keep behaving as they currently do.

I agree. This is a direct consequence of using paths as identifiers: the target node after a move *is not* the same (wrt. to isSame()) than the source node under this model. In contrast to the model where each node has an UUID. Here the target node after a move *is* the same than the source node.

So the correct behaviour for non referenceable nodes thus is:

   Node foo = session.getNode("/foo");
   session.move("/foo", "/bar");

   foo.getPath(); // throws IllegalItemStateException

   session.getRootNode().addNode("foo");

   foo.getPath(); // Evaluates to "/foo"


Michael

Reply via email to