I want to use a "case ... when ... then ... else ... end" statement from
hibernate, but only know the condition values at run time.
I have been searching all day and have not found a good way of doing this.
I would rather use HQL, but the only option I have found is to put SQL in my code.
The documentation says use this type of expression:
<formula>case when effectiveEndDate is null then 1 else 0 end</formula>
I want to be able to swap values within the statement at runtime.
All help much appreciated,
Eddy.
|