You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Dave Dombrosky (JIRA)" <ji...@apache.org> on 2010/02/10 21:56:36 UTC

[jira] Reopened: (CAY-1376) Certain EJBQL queries have mismatched table aliases

     [ https://issues.apache.org/jira/browse/CAY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dave Dombrosky reopened CAY-1376:
---------------------------------


I'm still seeing this because I reported the remaining issue incorrectly.  The problem I'm seeing is not with flattened relationships, it's when using a chained join that goes across db schemas.  I'm not sure if going across schemas is the cause, but this is just what I'm seeing in my project.

Here's the query I'm trying to use: SELECT t.rel1.rel2 FROM Table t GROUP BY t.rel1.rel2

Which then gets the following error: column t1.foobar does not exist.  It gets this error because it is putting t1.foobar in the GROUP BY clause when it should be using t2.foobar.  The rel1 points to t1 and the rel2 points to t2.  All the other aliases look correct, it's just the ones in the GROUP BY clause that reference the wrong alias.

> Certain EJBQL queries have mismatched table aliases
> ---------------------------------------------------
>
>                 Key: CAY-1376
>                 URL: https://issues.apache.org/jira/browse/CAY-1376
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 3.0RC2
>            Reporter: Dave Dombrosky
>             Fix For: 3.0RC2
>
>         Attachments: ejbqlGroupBy.patch, jointEntityNamesGenerationFix-mismatchedAliases.patch
>
>
> On some EJBQL queries, the wrong table aliases are being use to refer to columns.  A similar issue was solved earlier in CAY-1114.  This problem seems to occur when EJBQLTranslationContext.getTableAlias() is called on relationships that span database schemas.

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