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/01/27 09:21:34 UTC
[jira] Created: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
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
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.
[jira] Commented: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
Posted by "Dave Dombrosky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805414#action_12805414 ]
Dave Dombrosky commented on CAY-1376:
-------------------------------------
I'm also getting a mismatched table alias when trying to use a flattened relationship in the GROUP BY. I tried fixing it with a patch similar to the first one here, but I could not figure it out. Maybe someone else could take a look at this?
> 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
> Attachments: ejbqlGroupBy.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.
[jira] Closed: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrus Adamchik closed CAY-1376.
--------------------------------
Resolution: Fixed
Fix Version/s: 3.0RC2
Dave, I applied the last patch. Feel free to reopen if you find this is not completely fixed.
> 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.
[jira] Commented: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
Posted by "Dave Dombrosky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805622#action_12805622 ]
Dave Dombrosky commented on CAY-1376:
-------------------------------------
Ksenia, the query you posted should be able to cause the error, as long as the FLATTENED_TEST_3 and FLATTENED_TEST_1 tables are in different schemas.
> 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
> Attachments: ejbqlGroupBy.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.
[jira] Closed: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
Posted by "Andrey Razumovsky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrey Razumovsky closed CAY-1376.
----------------------------------
Resolution: Fixed
Assignee: Andrey Razumovsky
Fixed (patch reworked to support more than two-tables chain)
> 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
> Assignee: Andrey Razumovsky
> Fix For: 3.0RC3
>
> Attachments: ejbqlGroupBy.patch, fixGroupByChainedJoins.patch, jointEntityNamesGenerationFix-mismatchedAliases.patch, testGroupByChainedJoins.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.
[jira] Commented: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
Posted by "Ksenia Khailenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805534#action_12805534 ]
Ksenia Khailenko commented on CAY-1376:
---------------------------------------
Could you post the full query in the case when you use a flattened relationship?
The query like
"SELECT COUNT(ft3), ft3.toFT1 FROM FlattenedTest3 ft3 GROUP BY ft3.toFT1"
passes successfully on objects from test/resources/dml/access.DataContextEJBQLFlattenedRelationshipsTest.xml
> 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
> Attachments: ejbqlGroupBy.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.
[jira] Commented: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805553#action_12805553 ]
Andrus Adamchik commented on CAY-1376:
--------------------------------------
The patch is applied to trunk btw , and will go to 3.0 branch shortly
> 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
> Attachments: ejbqlGroupBy.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.
[jira] Updated: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
Posted by "Dave Dombrosky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Dombrosky updated CAY-1376:
--------------------------------
Attachment: testGroupByChainedJoins.patch
Added attachment that shows the problem. Looks like the tables don't need to be in different schemas, which would explain why the getTablesAlias() fixes didn't resolve the issue.
> 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, testGroupByChainedJoins.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.
[jira] Commented: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
Posted by "Dave Dombrosky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805641#action_12805641 ]
Dave Dombrosky commented on CAY-1376:
-------------------------------------
Just to clarify, I'm seeing the error when both FLATTENED_TEST_1 and FLATTENED_TEST_2 are in a separate schema from FLATTENED_TEST_3.
> 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
> Attachments: ejbqlGroupBy.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.
[jira] Updated: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
Posted by "Ksenia Khailenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ksenia Khailenko updated CAY-1376:
----------------------------------
Attachment: jointEntityNamesGenerationFix-mismatchedAliases.patch
> 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
> 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.
[jira] Updated: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
Posted by "Dave Dombrosky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Dombrosky updated CAY-1376:
--------------------------------
Attachment: fixGroupByChainedJoins.patch
Added fix for the problem found in the testGroupByChainedJoins.patch file.
> 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.0RC3
>
> Attachments: ejbqlGroupBy.patch, fixGroupByChainedJoins.patch, jointEntityNamesGenerationFix-mismatchedAliases.patch, testGroupByChainedJoins.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.
[jira] Updated: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
Posted by "Dave Dombrosky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Dombrosky updated CAY-1376:
--------------------------------
Attachment: ejbqlGroupBy.patch
Patch to fix an error with EJBQL GROUP BY caused by grouping on a schema-spanning relationship.
> 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
> Attachments: ejbqlGroupBy.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.
[jira] Updated: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
Posted by "Dave Dombrosky (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAY-1376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Dombrosky updated CAY-1376:
--------------------------------
Fix Version/s: (was: 3.0RC2)
3.0RC3
Edited issue to specify that this should be fixed for the next release candidate.
> 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.0RC3
>
> Attachments: ejbqlGroupBy.patch, jointEntityNamesGenerationFix-mismatchedAliases.patch, testGroupByChainedJoins.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.
[jira] Reopened: (CAY-1376) Certain EJBQL queries have mismatched
table aliases
Posted by "Dave Dombrosky (JIRA)" <ji...@apache.org>.
[ 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.