-->
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: Having clause with Criteria API possible?
PostPosted: Thu Apr 20, 2006 7:06 am 
Newbie

Joined: Wed Aug 10, 2005 9:08 pm
Posts: 6
Hi all,

In our client-server application the user can build up a report by selecting attributes (normal properties i.e id, name,....) and metrics (count, sum,...), by giving the conditions.
Of course the conditions for the metrics would become HAVING in the SQL, HQL.
As in this use case we build up the queries on the fly, it would be fine to use the Criteria API for that. I saw, with Projections.groupProperty(..) the group by can be solved. But is there any way to give Having with Criteria API?
I searched through the posts, but there were no answers for questions regarding to the HAving clause. And in the web I couln't find any useful for that.

- Is there a general way to give HAVING with the criteria API
- Or is there a workaroung for that? (Mainly we use only count() for metrics)
- Will it be maybe implemented in the future?

Thnx for the answers in advance!

George



Hibernate version: 3.2 cr1


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.