Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3034A10159 for ; Mon, 12 Aug 2013 22:03:48 +0000 (UTC) Received: (qmail 74806 invoked by uid 500); 12 Aug 2013 22:03:48 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 74756 invoked by uid 500); 12 Aug 2013 22:03:48 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 74706 invoked by uid 99); 12 Aug 2013 22:03:48 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Aug 2013 22:03:48 +0000 Date: Mon, 12 Aug 2013 22:03:47 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: dev@openjpa.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OPENJPA-2376) Escape character in JPQL with parameter substitution generates incorrect SQL MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OPENJPA-2376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13737418#comment-13737418 ] ASF subversion and git services commented on OPENJPA-2376: ---------------------------------------------------------- Commit 1513276 from [~jpaheath] in branch 'openjpa/trunk' [ https://svn.apache.org/r1513276 ] OPENJPA-2376: Escape character in JPQL with parameter substitution generates incorrect SQL - committed a patch sent to me by Albert Lee - merged changes from 2.1.x. > Escape character in JPQL with parameter substitution generates incorrect SQL > ---------------------------------------------------------------------------- > > Key: OPENJPA-2376 > URL: https://issues.apache.org/jira/browse/OPENJPA-2376 > Project: OpenJPA > Issue Type: Bug > Components: jdbc > Affects Versions: 2.1.1, 2.2.1, 2.2.2, 2.2.1.1 > Reporter: Albert Lee > Assignee: Albert Lee > Attachments: OPENJPA-2376.21x.patch, OPENJPA-2376.22x.patch > > > Escape character in JPQL/SQL with parameter substitution generates incorrect SQL. E.g. > "SELECT 'TRUE' AS VAL FROM DUAL WHERE '\\' = ?" > or > "SELECT * FROM ( SELECT FOLDER_ID, SYS_CONNECT_BY_PATH(NAME,'\\') AS PATH FROM PROJECT_FOLDER START WITH PARENT_ID IS NULL CONNECT BY PRIOR FOLDER_ID = PARENT_ID ) WHERE PATH LIKE ?" > the '\\' will be transformed to '' and causes SQLException when send to the db server. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira