jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-2667) NodeReferences are lost when deleting and setting the same reference in the same save() cycle
Date Wed, 30 Jun 2010 15:56:50 GMT

    [ https://issues.apache.org/jira/browse/JCR-2667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883957#action_12883957
] 

Stefan Guggisberg commented on JCR-2667:
----------------------------------------

most likely a regression of JCR-2138

> NodeReferences are lost when deleting and setting the same reference in the same save()
cycle
> ---------------------------------------------------------------------------------------------
>
>                 Key: JCR-2667
>                 URL: https://issues.apache.org/jira/browse/JCR-2667
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 1.6.1
>            Reporter: C├ędric Damioli
>            Priority: Critical
>             Fix For: 1.6.3
>
>
> I've written the following snippet to illustrate the issue :
>         Node root = session.getRootNode();
>         
>         Node a = root.addNode("a");
>         Node b = root.addNode("b");
>         b.addMixin("mix:referenceable");
>         
>         a.setProperty("p", b);
>         
>         root.save();
>         
>         System.out.println(b.getReferences().getSize());     // --> correctly returns
1
>         
>         a.setProperty("p", (Node) null);
>         a.setProperty("p", b);
>         
>         root.save();
>         
>         System.out.println(b.getReferences().getSize());    // --> returns 0 !
> When the ChangeLog is processed, added references are processed before deleted ones,
so the persisted NodeReferences is finally wrong.
> I've set the priority of this issue to critical, because the persisted references count
is corrupted.
> A simple workaround is to first remove the property, then save, then add the property
again, but it not satisfying.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message