Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-80

Bad Escaping for LIKE in MySQL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.9.7
    • query
    • None
    • openJPA 0.9.7
      MySQL 5.0.15

    Description

      the following query :

      em.createQuery("select k from KategorieGruppe k where k.bezeichnung like ?1 order by k.bezeichnung asc");

      generates an sql-statement with a bad escaping character '\' for MySQL :

      SELECT t0.id, t0.bezeichnung FROM ekv2kategoriegruppe t0 WHERE (t0.bezeichnung LIKE ? ESCAPE '\') ORDER BY t0.bezeichnung ASC

      the correct escaping would be '
      '.

      Attachments

        Activity

          People

            Unassigned Unassigned
            brj Jakob Braeuchi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: