[ 
http://issues.apache.org/jira/browse/OPENJPA-80?page=comments#action_12449481 ] 
            
Marc Prud'hommeaux commented on OPENJPA-80:
-------------------------------------------

Note that you should be able to work around the issue for the time being by 
setting the property "openjpa.jdbc.DBDictionary" to "searchStringEscape=\\" in 
your persistence.xml file or in the properties you use to create the 
EntityManagerFactory.

> 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

        

Reply via email to