Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 73138 invoked from network); 13 Nov 2006 20:23:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Nov 2006 20:23:58 -0000 Received: (qmail 37491 invoked by uid 500); 13 Nov 2006 20:24:09 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 37467 invoked by uid 500); 13 Nov 2006 20:24:09 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 37458 invoked by uid 99); 13 Nov 2006 20:24:09 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2006 12:24:09 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2006 12:23:57 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A326F7142D7 for ; Mon, 13 Nov 2006 12:23:37 -0800 (PST) Message-ID: <27039073.1163449417644.JavaMail.jira@brutus> Date: Mon, 13 Nov 2006 12:23:37 -0800 (PST) From: "Marc Prud'hommeaux (JIRA)" To: open-jpa-dev@incubator.apache.org Subject: [jira] Commented: (OPENJPA-80) Bad Escaping for LIKE in MySQL In-Reply-To: <30600981.1163448159091.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ 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