-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Bitwise operation in Criteria
PostPosted: Mon Dec 04, 2006 12:28 am 
Newbie

Joined: Thu Nov 30, 2006 12:22 am
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.