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

SQL queries for LIKE expressions with escape character generated with syntax errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1M3, 3.0.3
    • None
    • None

    Description

      Originally reported at users mailing list: http://markmail.org/message/5t6s6deuecn7ni3c
      For LIKE expressions with a usage of escape characters Cayenne generates SQL queries such as

      SELECT * FROM TEST_TABLE t0 WHERE UPPER(t0.NAME) LIKE UPPER(?

      {escape '*'}

      ) [bind: 1->NAME:'A*_1']

      which causes SQLException with message "Incorrect syntax near the keyword 'escape'."

      Attachments

        1. escape-char.patch
          4 kB
          Dzmitry Kazimirchyk

        Activity

          People

            demitri Dzmitry Kazimirchyk
            demitri Dzmitry Kazimirchyk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: