You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Ksenia Khailenko (JIRA)" <ji...@apache.org> on 2010/01/25 14:51:34 UTC
[jira] Updated: (CAY-1367) EJBQL: Implement support for
relationship-ending paths in GROUP BY clause
[ https://issues.apache.org/jira/browse/CAY-1367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ksenia Khailenko updated CAY-1367:
----------------------------------
Attachment: 0001-CAY-1367.patch
> EJBQL: Implement support for relationship-ending paths in GROUP BY clause
> -------------------------------------------------------------------------
>
> Key: CAY-1367
> URL: https://issues.apache.org/jira/browse/CAY-1367
> Project: Cayenne
> Issue Type: Bug
> Components: Core Library
> Affects Versions: 3.0RC2
> Reporter: Dave Dombrosky
> Assignee: Andrus Adamchik
> Attachments: 0001-CAY-1367.patch
>
>
> Test case to cause the error:
> ObjectContext context = createDataContext();
>
> Expression exp = ExpressionFactory.matchExp(Painting.TO_GALLERY_PROPERTY, null);
> EJBQLQuery query = new EJBQLQuery("select count(p), p.toArtist from Painting p where " + exp.toEJBQL("p") + " group by p.toArtist");
>
> context.performQuery(query);
> From the test I get this message:
> java.sql.SQLException: Not in aggregate function or group by clause: org.hsqldb.Expression@83b18f in statement [SELECT COUNT(*) AS sc0, t1.ARTIST_ID AS ec1_2, t1.ARTIST_NAME AS ec1_1, t1.DATE_OF_BIRTH AS ec1_0 FROM PAINTING t0 LEFT OUTER JOIN ARTIST t1 ON (t0.ARTIST_ID = t1.ARTIST_ID) GROUP BY t0.ARTIST_ID]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.