jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@adobe.com>
Subject Re: Inconsistent behavior upon moving nodes
Date Thu, 07 Feb 2013 13:28:28 GMT
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

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

View raw message