Minor update from here.
Checked out Hibernate3 head revision, called "build junitreport" and noticed a (small) bunch of warnings and errors in test.hql... anyway, added a property "long when;" to Animal.java (+xml) and inserted a parse statement in "HqlParsertTest#testOrderBy()" ... works w/ warnings.
As my entity depends on EJB annotations, which are not part of the main trunk, it is not an easy task to port my simple application to an automated test case. :(
Maybe, I'll pack a stripped and runnable version of my local
test and submit it entirely to JIRA tonight.
(...)
I did some more refactorings against my code and tested
where -- prints a warning, but does
not break w/ the exception from the initial posting
Code:
2005-03-15 15:17:02,359 WARN [main] ErrorCounter - *** WARNING: Keyword 'where' is being intepreted as an identifier due to: expecting IDENT, found 'where'
left and
right and
then -- quit the show
Code:
2005-03-15 16:20:50,921 ERROR [main] ErrorCounter - *** ERROR: line 1:30: unexpected token: .
2005-03-15 16:20:50,921 WARN [main] HqlParser - processEqualityExpression() : No expression to process!
Exception in thread "main" org.hibernate.hql.ast.QuerySyntaxError: unexpected token: . near line 1, column 30 [from chat.Saying s order by s.left desc]
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.list(SessionImpl.java:773)
Testing,
Christian
PS -- 'top' and 'bottom' and 'whenever' do work. :-)