Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1371

EJBQL query doesn't preserve grouping by brackets

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0RC2
    • 3.0RC2
    • Core Library
    • None

    Description

      EJBQL statement:

      SELECT object(t) FROM User t WHERE (t.language.code = 'fr') AND ((upper(t.email) LIKE '%ANDREAS.HARTMANN@GMAIL.COM%') OR (upper(t.email) LIKE '%NOBBY@MACBAY.DE%'))

      Resulting query:

      SELECT COUNT AS sc0 FROM public.user t0 INNER JOIN public.language t1 ON (t0.language = t1.code) WHERE t1.code = ? AND

      {fn UCASE( t0.email)} LIKE ? OR {fn UCASE( t0.email)}

      LIKE ?

      In the resulting query, the brackets surrounding the OR clause are lost.

      Attachments

        1. CAY-1371.patch
          0.8 kB
          Andreas Hartmann
        2. 1371.txt
          9 kB
          Andrey Razumovsky

        Activity

          People

            antidote Andrey Razumovsky
            andreas@apache.org Andreas Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: