Of course I can do that,
but I asked about HQL and the ability to count HQL query result rows.
Solutions such as building additional query with select(*) are not pretty, solutions that suggest manipulating the hql query string manually are also very risky.
The solution I would have done in proper SQL would be:
Code:
select count(*) from (SQL Query)
But I don't think it is an option here since I'm not sure I can get the query parameters, or clone a query, and also this syntax doesn't seem to be supported by HQL.
Thanks,
Roee.