Hibernate version:
hibernate 3.2 ga
MySQL5.0
I want to retrieve objects with a given bit set to 1 in a byte property...
is it somehow possible to perform bit operations in the where clause?
like:
from EcEntityAccess ec where ec.ecEntityByIdSubject.ebtEntityType = 2
and ec.ecEntityByIdPrincipal = :principal
and (ec.accessflags & :flags) > 0
In MySQL bit operations seem to be possible, but when i try it in HQL i get a org.hibernate.QueryException:
org.hibernate.QueryException: unexpected char: '&' [from net.empego.core.hbm.EcEntityAccess ec where ec.ecEntityByIdSubject.ebtEntityType = 2
and ec.ecEntityByIdPrincipal = :principal
and (ec.accessflags & :flags) > 0
Any idea for a solution or a workaround!?
thanks for help,
thomas
|