cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Mitter (JIRA)" <>
Subject [jira] Created: (CAY-1541) Qualifier clause does not quote identifiers
Date Fri, 18 Feb 2011 14:27:38 GMT
Qualifier clause does not quote identifiers

                 Key: CAY-1541
             Project: Cayenne
          Issue Type: Bug
          Components: Core Library
    Affects Versions: 3.0.1
            Reporter: Andreas Mitter
            Priority: Minor

Qualifier clause does not quote identifiers, example:
SELECT "t0"."fk_x", "t0"."id" FROM "MyTable" "t0" WHERE t0.fk_x = ?

This obviously does not work if any qualifier identifiers need to be quoted.

Additionally on Derby this fails even if none of the identifiers need to be quoted.
ERROR 42X04: Column 'T0.FK_X' is either not in any table in the FROM list or appears within
a join specification and is outside the scope of the join specification or appears in a HAVING
clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE  statement then
'T0.FK_X' is not a column in the target table.

Index: framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/
--- framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/
(revision 1072000)
+++ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/
(working copy)
@@ -182,7 +182,7 @@
             DbAttribute attr = objectMatchTranslator.getAttribute(key);
             Object val = objectMatchTranslator.getValue(key);
-            processColumn(attr);
+            processColumnWithQuoteSqlIdentifiers(attr);
             appendLiteral(val, attr, objectMatchTranslator.getExpression());

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message