-->
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.  [ 4 posts ] 
Author Message
 Post subject: Query on a boolean?
PostPosted: Mon Sep 15, 2003 9:15 am 
Newbie

Joined: Mon Sep 15, 2003 9:09 am
Posts: 9
What's the proper way to query on a boolean (yes_no) field? The property in my class is type boolean (not Boolean). The mapping type is "yes_no". The query I want to write is something like:

session.find("from Question as q where q.isActive = true")

'true' in this query is an invalid identifier.

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 15, 2003 9:42 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
You need to define true and false in hibernate.query.substitutions.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 15, 2003 10:17 am 
Newbie

Joined: Mon Sep 15, 2003 9:09 am
Posts: 9
Thanks- that does the trick. Is there a planned alternative to this? I thought there would be a way that would rely on the mapping type (yes_no), instead.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Sep 15, 2003 10:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Nope, this is how it has always been...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.