Message:
A new issue has been created in JIRA.
---------------------------------------------------------------------
View the issue:
http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-289
Here is an overview of the issue:
---------------------------------------------------------------------
Key: CAY-289
Summary: Cayenne makes invalid queries when table attributes have spaces, national or other special characters
Type: Bug
Status: Assigned
Priority: Minor
Project: Cayenne
Components:
Cayenne Core Library
Versions:
1.2 [DEV]
Assignee: Andrus Adamchik
Reporter: Tomislav Nakic-Alfirevic
Created: Mon, 14 Mar 2005 11:19 AM
Updated: Mon, 14 Mar 2005 11:19 AM
Environment: Linux, Sun JDK1.5, MS SQL Server 2000, jtds-1.0, Croatian locale
Description:
Say a table "t0" has an attribute "my attrib 0".
You correct the obj-attribute to, for instance, "my_attrib_0", but the db-attribute is still "my attrib 0".
When you try to run a query on "t0", the generated query looks like:
SELECT ..., t0.my attrib 0, ... FROM dbo.t0 AS t0
This, obviously, can't possibly work.
The correct SQL would be:
SELECT ..., t0.[my attrib 0], ... FROM dbo.[t0] AS t0
Notice the square brackets arround the attributes and table names: that makes the string a valid attribute or table name valid.
A further improvement might be to add the database name:
SELECT ..., t0.[my attrib 0], ... FROM [dbname].dbo.[t0] AS t0
I mention it because I use the quantum plugin as a database access plugin and it complained about a table called "dbo.tablename" (as I believe it should) and all was well when I used mydbname.dbo.tablename.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://objectstyle.org/jira/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
This archive was generated by hypermail 2.0.0 : Mon Mar 14 2005 - 11:21:21 EST