Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-8111

Error in MockQueryResult when camelCase nodetypes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2.15
    • 6.2.9
    • None

      Steps to reproduce

      • Create a MockSession
      • Create MockNodes with a camelCase primary node type (e.g. mgnl:contentNode)
      • Query for the nodes (select * from [mgnl:contentNode])

      Expected results

      MockQueryResult returns a collection of nodes

      Actual results

      MockQueryResult result is empty

      Development notes

      The problem is in the constructor of MockQueryResult as it lowercases the passed statement and thus, the camelcase node type.

      info.magnolia.test.mock.jcr.MockQueryResult line 60
      this.type = StringUtils.substringBefore(StringUtils.substringAfter(statement.toLowerCase(), " from "), " where ").trim();

        Acceptance criteria

              thuy.to Thuy To
              jayala Jonathan Ayala
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 1d 1h
                    1d 1h