Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2116

Error cloning nodes with autocreated mandatory subnodes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Rejected
    • Affects Version/s: 3.6.0.Final
    • Fix Version/s: 3.7.0.Final
    • Component/s: JCR
    • Labels:
      None

      Description

      If we try to clone node which has autocreated mandatory subnodes exception is thrown

      javax.jcr.nodetype.ConstraintViolationException: The node at "/a/autocreatedChildren/Eeee" with UUID "820c8b2a-991e-4fa8-af41-e5fbfb419c0a" exists in the current workspace but cannot be removed because it is a mandatory child node
      

      Clone method is called like:

      workspace.clone(workspace.getName(), "/a/autocreatedChildren", "/b/clone", false);
      

      Segment of java doc from clone method:

      *removeExisting* if false then this method throws an ItemExistsException on identifier conflict with an incoming node. 
      

      Another exception is thrown

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  Veskop86 Veselin Perovic
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: