does anyone know how to use bitwise AND (&) as criteria for a JPA NamedQuery without having to use a @NamedNativeQuery?
I\'m storing status bits in a field.
Bitwise AND
is not part of JPQL. But...
Can be use 2 rules:
try
SELECT v FROM ViewProductsList v WHERE MOD(v.statusId/16 , 2) = 1
'Bitwise AND' is not part of JPQL. Native query is the portable way to go.