Uploaded image for project: 'Magnolia Demo Projects'
  1. Magnolia Demo Projects
  2. MGNLDEMO-261

Tours durations are stored as String properties

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.2.3
    • None
    • tours-app
    • None
    • Kromeriz 140
    • 2

      The duration property is stored as a String in JCR, so comparing it to other values results in unexpected behaviors. In REST Content Delivery, filters and operators expose the same behavior.

      Go to JCR tools app and select the tours workspace.

      A:

      select * from [mgnl:content] where duration > 22

      All 36 tours are returned, whereas none of them has a duration exceeding 21 (possible values are 2, 7, 14 and 21). Possibly, constraint between non-matching types may be ignored by Jackrabbit (any long value prompts all results).

      B:

      select * from [mgnl:content] where duration > "6"

      Only tours with duration equal to 7 (not 14 nor 21) are returned, because string comparison is done lexicographically.

        Acceptance criteria

              rsiska Robert Šiška
              mgeljic Mikaël Geljić
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD