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

    Details

    • Workaround:
      Workaround Exists
    • Workaround Description:
      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.

      Description

      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".

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                rhauch Randall Hauch
                Reporter:
                rhauch Randall Hauch
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: