Tuesday, February 28, 2012

Hibernate Case in Select Clause strange behavior

It seems there is some strange behavior when using the CASE WHEN THEN ELSE END in the select clause.
When using

It results in  java.lang.ClassCastException: org.hibernate.hql.internal.ast.tree.SqlNode cannot be cast to org.hibernate.hql.internal.ast.tree.SelectExpression

But if we try negating it, i.e.

Then it runs.  Very Strange.

There is also a forum post 

No comments:

Post a Comment