How to convert a boolean to an int in the query?
I have five parameters of type boolean in the entity object - approveEmail, approvePhoneNumber, ...
I can not sort them
ORDER BY approveEmail, approvePhoneNumber, ....
because the parameters equivalent.
I want to sort them in the query by their sum
ORDER BY (approveEmail + approvePhoneNumber + ... )
But I get an exception
com.objectdb.o._PersistenceException: Invalid operand type boolean for operator +
Please tell me how to do this?
Thanks for your help