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: HQL to return a boolean value
PostPosted: Sun Jan 09, 2005 11:47 pm 
Beginner
Beginner

Joined: Fri Jun 25, 2004 5:31 am
Posts: 31
Hibernate version:3 Alpha

Name and version of the database : JBoss 4.0.0

I need to write an HQL that returns a boolean depending on the contents of another value.

i.e. I need to display ID, Name, TypeID, IsTrue from a table called MyTable where TypeID is a foreign key and IsTrue holds true/false depending on the value of the TypeID (If TypeID has a string then IsTrue is assigned true, if TypeID has a null then IsTrue is assigned false).

Note : IsTrue is an attribute that does not exist as a field of a table, but gets created at the query execution to .


please help.


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.