I need to create a query and I need COUNT(*) and HAVING COUNT(*) = x.
COUNT(*)
HAVING COUNT(*) = x
I\'m using a work around that uses the CustomProjection
CustomProjection
criteria.add(Restrictions.sqlRestriction("1=1 having count(*) = 2"));