jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (Updated) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (JCR-2930) same named child nodes disappear on restore
Date Tue, 20 Dec 2011 16:58:31 GMT

     [ https://issues.apache.org/jira/browse/JCR-2930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jukka Zitting updated JCR-2930:
-------------------------------

    Fix Version/s:     (was: 2.4)
                   2.3.6
    
> same named child nodes disappear on restore
> -------------------------------------------
>
>                 Key: JCR-2930
>                 URL: https://issues.apache.org/jira/browse/JCR-2930
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core, versioning
>    Affects Versions: 2.2.4
>            Reporter: Marlis Lamp
>            Assignee: Julian Reschke
>            Priority: Critical
>             Fix For: 2.3.6
>
>         Attachments: JCR-2930.diff, RestoreNodeWithSNSTest.java, VersionManagerImplRestore.patch
>
>
> When restoring a versionable node which has several (non-versionable) child nodes with
the same name, some child nodes disappear. 
>             Node node = session.getRootNode().addNode("myNode");
>             node.addMixin("mix:versionable");
>             for (int i = 1; i < 6; i++) {
>                 Node child = node.addNode("child");
>                 child.setProperty("name", "child_"+i);
>             }
>             session.save();
>             VersionManager versionManager = session.getWorkspace().getVersionManager();
>             versionManager.checkin(node.getPath());
>             System.out.println("number of child nodes: " + node.getNodes().getSize());
>             versionManager.checkout(node.getPath());
>             node.getNode("child").setProperty("name", "modified");
>             session.save();
>             Version baseVersion = versionManager.getBaseVersion(node.getPath());
>             versionManager.restore(baseVersion, true);
>             System.out.println("number of child nodes in restored node: "+node.getNodes().getSize());
> produces the following output:
> number of child nodes: 5
> number of child nodes in restored node: 3
> Giving unique names or adding the mixin versionable to the child nodes solves the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message