cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CAY-1541) Qualifier clause does not quote identifiers
Date Fri, 18 Feb 2011 14:33:38 GMT

    [ https://issues.apache.org/jira/browse/CAY-1541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996425#comment-12996425
] 

Andrus Adamchik commented on CAY-1541:
--------------------------------------

This seems to be a duplicate of CAY-1506 that is already fixed and awaiting release in 3.0.2.
If you feel like building Cayenne from the source until then, you may get it here http://svn.apache.org/repos/asf/cayenne/main/branches/STABLE-3.0/

> Qualifier clause does not quote identifiers
> -------------------------------------------
>
>                 Key: CAY-1541
>                 URL: https://issues.apache.org/jira/browse/CAY-1541
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.0.1
>            Reporter: Andreas Mitter
>            Priority: Minor
>              Labels: patch
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> 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/QualifierTranslator.java
> ===================================================================
> --- framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/QualifierTranslator.java
(revision 1072000)
> +++ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/trans/QualifierTranslator.java
(working copy)
> @@ -182,7 +182,7 @@
>              DbAttribute attr = objectMatchTranslator.getAttribute(key);
>              Object val = objectMatchTranslator.getValue(key);
>  
> -            processColumn(attr);
> +            processColumnWithQuoteSqlIdentifiers(attr);
>              out.append(objectMatchTranslator.getOperation());
>              appendLiteral(val, attr, objectMatchTranslator.getExpression());
>          }

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message