Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.4
    • Fix Version/s: 2.3.6
    • Component/s: jackrabbit-core, versioning
    • Labels:
      None

      Description

      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.

        Attachments

        1. JCR-2930.diff
          6 kB
          Julian Reschke
        2. RestoreNodeWithSNSTest.java
          2 kB
          Julian Reschke
        3. VersionManagerImplRestore.patch
          2 kB
          Marlis Lamp

          Activity

            People

            • Assignee:
              reschke Julian Reschke
              Reporter:
              marlis Marlis Lamp
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: