You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2013/02/12 17:03:13 UTC

[jira] [Comment Edited] (OAK-606) Node becomes invalid after Session#move()

    [ https://issues.apache.org/jira/browse/OAK-606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13576719#comment-13576719 ] 

angela edited comment on OAK-606 at 2/12/13 4:01 PM:
-----------------------------------------------------

that makes more sense to me. while it's different from the behavior in jr 2.x it will at least throw
immediately (assuming that it will work the same for NEW nodes).

one more thing we discussed:
if a node that is being moved has referenceable children those have to stay valid. in other words:

{code}
Node foo = session.getNode("/foo");
Node child = foo.addNode("child");
child.addMixin("mix:referenceable");
Node child2 = child.addNode("nonreferenceable");

session.move("/foo", "/bar");
child.getPath(); // will return "/bar/child"
{code}

and once we have fixed the identifier of non-referenceable nodes:
{code}
child2.getPath(); // will return "/bar/child/nonreferenceable");
{code}

                
      was (Author: anchela):
    that makes more sense to me. while it's different from the behavior in jr 2.x it will at least throw
immediately (assuming that it will work the same for NEW nodes).

one more thing we discussed:
if a node that is being moved as referenceable children those have to stay valid. in other words:

{code}
Node foo = session.getNode("/foo");
Node child = foo.addNode("child");
child.addMixin("mix:referenceable");
Node child2 = child.addNode("nonreferenceable");

session.move("/foo", "/bar");
child.getPath(); // will return "/bar/child"
{code}

and once we have fixed the identifier of non-referenceable nodes:
{code}
child2.getPath(); // will return "/bar/child/nonreferenceable");
{code}

                  
> Node becomes invalid after Session#move()
> -----------------------------------------
>
>                 Key: OAK-606
>                 URL: https://issues.apache.org/jira/browse/OAK-606
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: jcr
>            Reporter: angela
>         Attachments: OAK-606.patch
>
>
> moving or renaming an existing (saved) node renders that node instance
> invalid and any access on that node instance will throw IllegalStateException.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira