I'm using Hibernate 3.1 and I need to do bitwise operation.
I've been using the
bitwise workaround found on the forum to use bitwise operations on HQL queries.
However, I want to use the criteria API instead of the HQL query. So far, I haven't found how to use any custom function in Criteria.
What I'm trying to achieve is something like this:
SQL: FROM Class class WHERE class.value & VALUE = class.value
HQL: FROM Class class WHERE bitwise_and(class.value, :VALUE) = class.value
Criteria: ?
Anyone knows if it can be done through Criteria or if I have no other choice than to stick to HQL queries?
Thanks,
Philippe