Here's an example of the exception thrown when using COUNT ( DISTINCT CASE WHEN
Code:
101976 [main] ERROR org.hibernate.hql.PARSER - line 1:93: unexpected token: CASE
101977 [main] ERROR org.hibernate.hql.PARSER - line 1:98: unexpected token: WHEN
and here's the exception thrown when the extra parenthesis is added to give
COUNT ( DISTINCT (CASE WHEN
Code:
85587 [main] ERROR org.hibernate.hql.PARSER - line 1:93: unexpected token: (
85588 [main] ERROR org.hibernate.hql.PARSER - line 1:99: unexpected token: WHEN
I just retried this after upgrading to the latest jars for hibernate-commons-annotations.jar, hibernate-annotations.jar, hibernate-entitymanager.jar, hibernate3.jar, and ejb3-persistence.jar. and am having the very same results.
Any ideas? I'd like to do my due diligence on prior related issues before reporting this to the Hibernate project as a bug.