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

Getting system nodes by their identifier does not work when identifier is found from the "jcr:uuid" property

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 3.1.1.Final, 3.2.0.Final
    • 3.0.0.Final
    • JCR
    • None
    • Workaround Exists
    • Hide

      Get the identifier of the system node with "getIdentifier()". Then calling Session.getNodeByIdentifier(...)" with the identifier string does work.

      Show
      Get the identifier of the system node with " getIdentifier() ". Then calling Session.getNodeByIdentifier(...) " with the identifier string does work.

      Normally, this code should always work:

      Node node = ...
      session.getNodeByIdentifier(node.getIdentifier());
      if ( node.isNodeType("mix:referenceable") {
          session.getNodeByIdentifier(node.getProperty("jcr:uuid").getString());
      }
      

      However, the second call to "getNodeByIdentifier()" with the "jcr:uuid" property value does not work if "node" happens to be under "/jcr:system".

              rhauch Randall Hauch (Inactive)
              rhauch Randall Hauch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: