You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Dzmitry Kazimirchyk (JIRA)" <ji...@apache.org> on 2011/06/03 12:43:47 UTC
[jira] [Created] (CAY-1577) SQL queries for LIKE expressions with
escape character generated with syntax errors
SQL queries for LIKE expressions with escape character generated with syntax errors
-----------------------------------------------------------------------------------
Key: CAY-1577
URL: https://issues.apache.org/jira/browse/CAY-1577
Project: Cayenne
Issue Type: Bug
Reporter: Dzmitry Kazimirchyk
Originally reported at users mailing list: http://markmail.org/message/5t6s6deuecn7ni3c
For LIKE expressions with a usage of escape characters Cayenne generates SQL queries such as
SELECT * FROM TEST_TABLE t0 WHERE UPPER(t0.NAME) LIKE UPPER(? {escape '*'}) [bind: 1->NAME:'A*_1']
which causes SQLException with message "Incorrect syntax near the keyword 'escape'."
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CAY-1577) SQL queries for LIKE expressions with
escape character generated with syntax errors
Posted by "Dzmitry Kazimirchyk (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dzmitry Kazimirchyk reassigned CAY-1577:
----------------------------------------
Assignee: Dzmitry Kazimirchyk
> SQL queries for LIKE expressions with escape character generated with syntax errors
> -----------------------------------------------------------------------------------
>
> Key: CAY-1577
> URL: https://issues.apache.org/jira/browse/CAY-1577
> Project: Cayenne
> Issue Type: Bug
> Reporter: Dzmitry Kazimirchyk
> Assignee: Dzmitry Kazimirchyk
> Attachments: escape-char.patch
>
>
> Originally reported at users mailing list: http://markmail.org/message/5t6s6deuecn7ni3c
> For LIKE expressions with a usage of escape characters Cayenne generates SQL queries such as
> SELECT * FROM TEST_TABLE t0 WHERE UPPER(t0.NAME) LIKE UPPER(? {escape '*'}) [bind: 1->NAME:'A*_1']
> which causes SQLException with message "Incorrect syntax near the keyword 'escape'."
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (CAY-1577) SQL queries for LIKE expressions with
escape character generated with syntax errors
Posted by "Dzmitry Kazimirchyk (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dzmitry Kazimirchyk closed CAY-1577.
------------------------------------
Resolution: Fixed
Fix Version/s: 3.1M3
3.0.3
Applied patch for both 3.1 and 3.0 branches.
> SQL queries for LIKE expressions with escape character generated with syntax errors
> -----------------------------------------------------------------------------------
>
> Key: CAY-1577
> URL: https://issues.apache.org/jira/browse/CAY-1577
> Project: Cayenne
> Issue Type: Bug
> Reporter: Dzmitry Kazimirchyk
> Assignee: Dzmitry Kazimirchyk
> Fix For: 3.0.3, 3.1M3
>
> Attachments: escape-char.patch
>
>
> Originally reported at users mailing list: http://markmail.org/message/5t6s6deuecn7ni3c
> For LIKE expressions with a usage of escape characters Cayenne generates SQL queries such as
> SELECT * FROM TEST_TABLE t0 WHERE UPPER(t0.NAME) LIKE UPPER(? {escape '*'}) [bind: 1->NAME:'A*_1']
> which causes SQLException with message "Incorrect syntax near the keyword 'escape'."
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAY-1577) SQL queries for LIKE expressions with
escape character generated with syntax errors
Posted by "Dzmitry Kazimirchyk (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dzmitry Kazimirchyk updated CAY-1577:
-------------------------------------
Attachment: escape-char.patch
Now generating queries like:
SELECT * FROM ARTIST t0 WHERE UPPER(t0.ARTIST_NAME) LIKE UPPER(?) {escape '*'} [bind: 1->ARTIST_NAME:'A*_1']
which works fine on HSQLDB, H2, Derby and SQL Server.
> SQL queries for LIKE expressions with escape character generated with syntax errors
> -----------------------------------------------------------------------------------
>
> Key: CAY-1577
> URL: https://issues.apache.org/jira/browse/CAY-1577
> Project: Cayenne
> Issue Type: Bug
> Reporter: Dzmitry Kazimirchyk
> Attachments: escape-char.patch
>
>
> Originally reported at users mailing list: http://markmail.org/message/5t6s6deuecn7ni3c
> For LIKE expressions with a usage of escape characters Cayenne generates SQL queries such as
> SELECT * FROM TEST_TABLE t0 WHERE UPPER(t0.NAME) LIKE UPPER(? {escape '*'}) [bind: 1->NAME:'A*_1']
> which causes SQLException with message "Incorrect syntax near the keyword 'escape'."
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira