cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <>
Subject [jira] Updated: (CAY-289) Implement Quoting of identifiers
Date Tue, 03 Feb 2009 08:39:45 GMT


Andrus Adamchik updated CAY-289:

        Fix Version/s:     (was: Short term future)
    Affects Version/s:     (was: 1.2 branch)

I committed the last patch by Olga (with some naming changes). Things should be working for
MySQL and HSQLDB ... We'll be testing other DB's shortly. To turn on quoting, use the new

> Implement Quoting of identifiers
> --------------------------------
>                 Key: CAY-289
>                 URL:
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: Cayenne Core Library
>    Affects Versions: 3.0M5
>         Environment: Linux, Sun JDK1.5, MS SQL Server 2000, jtds-1.0, Croatian locale
>            Reporter: Tomislav Nakic-Alfirevic
>            Assignee: Andrus Adamchik
>             Fix For: 3.0M6
>         Attachments: diff.txt, diff.txt, diffQuoteSqlIdentifiers.txt, quoteSqlIdentifiers.txt,
> 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 ..., 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

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message