You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Jakob Braeuchi (JIRA)" <ji...@apache.org> on 2006/11/13 21:17:37 UTC
[jira] Commented: (OPENJPA-80) Bad Escaping for LIKE in MySQL
[ http://issues.apache.org/jira/browse/OPENJPA-80?page=comments#action_12449480 ]
Jakob Braeuchi commented on OPENJPA-80:
---------------------------------------
the variable searchStringEscape must be correctly set in org.apache.openjpa.jdbc.sql.MySQLDictionary:
...
searchStringEscape = "\\\\";
...
> Bad Escaping for LIKE in MySQL
> ------------------------------
>
> Key: OPENJPA-80
> URL: http://issues.apache.org/jira/browse/OPENJPA-80
> Project: OpenJPA
> Issue Type: Bug
> Components: query
> Environment: openJPA 0.9.7
> MySQL 5.0.15
> Reporter: Jakob Braeuchi
>
> 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 '\\'.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira