Hibernate 3 rc1 breaks grouping by functions.
It complains about finding an open paren after the 'group by'.
The funny thing is, it works in the beta version of Hibernate 3 that was included in Hibernate Tools alpha1.
org.hibernate.hql.ast.QuerySyntaxError: unexpected token: ( near line 1, column 97 [select sum(t.clicks), date(t.date) from hdc.Tracker t where t.listing.merchant = ? group by date(t.date) order by sum(t.clicks)]
at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:74)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:214)
at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:127)
at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)
at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:414)
at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:814)
at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:850)
at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:41)
at hdc.Test1.doTest5(Test1.java:241)
at hdc.Test1.main(Test1.java:317)
Caused by: line 1:97: unexpected token: (
at org.hibernate.hql.antlr.HqlBaseParser.groupByClause(HqlBaseParser.java:896)
at org.hibernate.hql.antlr.HqlBaseParser.queryRule(HqlBaseParser.java:704)
at org.hibernate.hql.antlr.HqlBaseParser.selectStatement(HqlBaseParser.java:227)
at org.hibernate.hql.antlr.HqlBaseParser.statement(HqlBaseParser.java:150)
at org.hibernate.hql.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:208)
... 8 more
|