Hi,
I’m using Cuba 7.1.
I want to filter a picker field with a type of records. There is an Enum defined for the type of the record. So how to use the value of an Enum in the JPQL where clause.
Like this?
<loader id="staffsDl">
<query>
<![CDATA[select e from align_Person e where e.personType = PersonType.STAFF]]>
</query>
</loader>
PersonType is the enum and STAFF is the one of the enum value. I know i can hard code the value(code) of the STAFF in the where clause and get the desired output.
But i don’t feel that is the right way to do it. Kindly suggest.