When a DetachedCrieria has projections, how to get the row count of the DetachedCriteria result set?
For HQL:
select count(*) from (select name, sum(grade) from score group by name).
For hibernate, how to implement Subqueries.rowCount(DetachedCriteria dc)?
If there is a way to extend a hibernate class, get sql from the DetachedCriteria, then I can add select count(*) from (sql).
criteria.list().size() will give me the answer, but the result set may have millions of records, too expensive.
Thanks for help.
Dave
Hi Mr. Dave Chen,
If you found a solution for this problem, could you please share it?
Thank you...