Reputation: 1727
I know case can be used as expression in where clause of HQL.
I read through this thread Using a CASE statement in HQL select
In a way my question is duplicate
Is it possible to use them in the select part of HQL with hibernate 4 or 5. I know its not possible with Hibernate 3.
Upvotes: 1
Views: 3744
Reputation: 21391
Yes it is.
There is a dedicated section in the Hibernate 5 Documentation you can take a look as well as in this section for Hibernate 4.3.
According to the changelog.txt it was added back in version 3.0 though not in the form it has evolve to today (SimpleCaseExpression, SearchedCaseExpression)
Upvotes: 2