as far as i remember we never decided to use the path as
identifier. we said that we want to keep it as stable as
possible... for a referenceable node Node#getIdentifier
returns the UUID for a non-referenceable node it should
include the parent identifier and a relative path thing.
kind regards
angela
On 2/7/13 2:09 PM, Michael Dürig wrote:
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