Uploaded image for project: 'eXo-JCR'
  1. eXo-JCR
  2. EXOJCR-954

Can't get property of a node if it has a child node with the same name with the property

    Details

      Description

      create a node PARENT
      PARENT.addNode("a");
      PARENT.setProperty("a", "abc");
      PARENT.save();
      PARENT.getProperty("a") -> Exception here -> ErrorError

      Code:

      public void testJCR() throws Exception {
      String sameName = "sameName";
      Node rootNode = session.getRootNode();
      Node aNode = rootNode.addNode("a");
      aNode.addNode(sameName);
      aNode.setProperty(sameName, "aa");
      session.save();
      Exception exception = null;
      try

      { aNode.getProperty(sameName); aNode.getNode(sameName); }

      catch (Exception e)

      { error("Exception here"); exception = e; }

      assertNull("Can't get property or node 'sameName' of current node", exception);
      aNode.remove();
      session.save();
      }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tolusha Anatolii Bazko
                Reporter:
                anhvurz90 Anh Vu Nguyen
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3 days
                  3d
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days
                  3d