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
|