Hibernate version:
3.0.x
There is a way to specify a "having clause" using Criteria API:
this an example "example" of what I want to do:
Code:
crit.setProjection( Projections.projectionList()
.add( Projections.groupProperty("id"))
.add( Projections.groupProperty("uri"))
.add( Projections.groupProperty("node"))
.add( Projections.count("id"), "recordsCount")
);
//And now I want to put a restriction on the recordCount
crit.add(Restrictions.ge("recordsCount", 2));
but I don't find how to specify that this restriction is a "having restrinction"
thanks![/code]