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

Error in MockQueryResult when camelCase nodetypes

    XMLWordPrintable

Details

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

    Description

      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();

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Bug DoR
                  Task DoD

                  Time Tracking

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