openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-2376) Escape character in JPQL with parameter substitution generates incorrect SQL
Date Mon, 12 Aug 2013 21:59:47 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-2376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13737413#comment-13737413
] 

ASF subversion and git services commented on OPENJPA-2376:
----------------------------------------------------------

Commit 1513275 from [~jpaheath] in branch 'openjpa/branches/2.2.x'
[ https://svn.apache.org/r1513275 ]

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

Mime
View raw message