You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Lautaro Brasseur (JIRA)" <ji...@apache.org> on 2010/11/11 16:00:15 UTC
[jira] Created: (CAY-1506) Reserverd words mapping in WHERE clause
Reserverd words mapping in WHERE clause
---------------------------------------
Key: CAY-1506
URL: https://issues.apache.org/jira/browse/CAY-1506
Project: Cayenne
Issue Type: Bug
Components: Core Library
Affects Versions: 3.0
Environment: Cayenne 3.0 + MSSQLServer (running in an OSGi environment)
Reporter: Lautaro Brasseur
I need to map a database schema which has reserverd words in column names. For example, the USER table has a column called GROUP.
I solved partially the problem, by setting Cayenne to quote identifiers:
DataMap dataMap = new DataMap(DUMMY_NAME);
dataMap.setQuotingSQLIdentifiers(true);
but this just quotes columns in the SELECT section. This generated query fails:
SELECT [t0].[NAME], [t0].[GROUP], [t0].[ID] FROM [USER] [t0] WHERE t0.GROUP = ? [bind: 1->GROUP:29]
because the GROUP column is used in the WHERE clause and it is not quoted.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (CAY-1506) Reserverd words mapping in WHERE clause
Posted by "Olga Tkacheva (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Tkacheva reassigned CAY-1506:
----------------------------------
Assignee: Olga Tkacheva
> Reserverd words mapping in WHERE clause
> ---------------------------------------
>
> Key: CAY-1506
> URL: https://issues.apache.org/jira/browse/CAY-1506
> Project: Cayenne
> Issue Type: Bug
> Components: Core Library
> Affects Versions: 3.0
> Environment: Cayenne 3.0 + MSSQLServer (running in an OSGi environment)
> Reporter: Lautaro Brasseur
> Assignee: Olga Tkacheva
>
> I need to map a database schema which has reserverd words in column names. For example, the USER table has a column called GROUP.
> I solved partially the problem, by setting Cayenne to quote identifiers:
> DataMap dataMap = new DataMap(DUMMY_NAME);
> dataMap.setQuotingSQLIdentifiers(true);
> but this just quotes columns in the SELECT section. This generated query fails:
> SELECT [t0].[NAME], [t0].[GROUP], [t0].[ID] FROM [USER] [t0] WHERE t0.GROUP = ? [bind: 1->GROUP:29]
> because the GROUP column is used in the WHERE clause and it is not quoted.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (CAY-1506) Reserverd words mapping in WHERE clause
Posted by "Olga Tkacheva (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Tkacheva closed CAY-1506.
------------------------------
Resolution: Fixed
Fix Version/s: 3.0.2
> Reserverd words mapping in WHERE clause
> ---------------------------------------
>
> Key: CAY-1506
> URL: https://issues.apache.org/jira/browse/CAY-1506
> Project: Cayenne
> Issue Type: Bug
> Components: Core Library
> Affects Versions: 3.0
> Environment: Cayenne 3.0 + MSSQLServer (running in an OSGi environment)
> Reporter: Lautaro Brasseur
> Assignee: Olga Tkacheva
> Fix For: 3.0.2
>
>
> I need to map a database schema which has reserverd words in column names. For example, the USER table has a column called GROUP.
> I solved partially the problem, by setting Cayenne to quote identifiers:
> DataMap dataMap = new DataMap(DUMMY_NAME);
> dataMap.setQuotingSQLIdentifiers(true);
> but this just quotes columns in the SELECT section. This generated query fails:
> SELECT [t0].[NAME], [t0].[GROUP], [t0].[ID] FROM [USER] [t0] WHERE t0.GROUP = ? [bind: 1->GROUP:29]
> because the GROUP column is used in the WHERE clause and it is not quoted.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.