-->
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.  [ 2 posts ] 
Author Message
 Post subject: Binary And and Or Operators in HQL
PostPosted: Thu Mar 31, 2005 7:19 am 
Newbie

Joined: Mon Oct 25, 2004 9:18 am
Posts: 7
Hi,

Working on supporting a legacy database with Hiberante 3.0 RC1. The database uses a lot of bitfield columns which means a lot of our queries rely on binary & and binary | working. This used to work fine in Hibernate 2.1.x but now dies in Hibernate 3.x with "unexpected char: '&'" errors.

A typical query would look something like this

"select UserProfile u where status & 1 = 1"

Note that all this is running on PostgreSQL which does support such an operator.

Is it likely that Hibernate 3.x HQL will support bitwise operators? Or is there a better way of dealing with legacy databases with these types of columnes? Possibly an EnumSet?

Thanks,
Dan


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 31, 2005 9:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you can always use native sql queries.

otherwise i dont think we have plan/support for bitwise operations.
It only works in H2 because that parser where more forgiven than the one in H3 which is more correct.


add a jira for the request of bitwise operators - but no promises.

_________________
Max
Don't forget to rate


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

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.