-->
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: Help with having clause
PostPosted: Thu Dec 13, 2007 11:50 am 
Newbie

Joined: Thu Nov 01, 2007 7:12 pm
Posts: 2
Hi,

I am new to hibernate and trying to create a DetachedCriteria for the following sql statement:

select foreign_key_id from tableX where location = 1 GROUP BY foreign_key_id, rank having count(foreign_key_id) = case rank when 3 then 1 else 2 end

Note: Object name is ObjectX and property names are same as column name

Please let me know, if you want any further info or clarification.

Any help is greatly appreciated.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 13, 2007 11:22 pm 
Senior
Senior

Joined: Fri Jun 01, 2007 12:41 pm
Posts: 121
Try using Projections.


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.