Hi all, i've a problem regarding knowing the recordcount of a select: i would know the count of records performing a "SELECT COUNT(*) FROM (hqlquery) ),
but when i surround a hql query by a select count(*) , hibernate fires an error ("unexpeted token....).
So my idea is to convert first the hql query definition into the corresponding sql definition /*BEFORE*/ hibernate executes the hql, in order to calculate (in sql) the count of records of a query.
How can i translate hql definition to sql defintion? there is some hibernate class helper?
Best regards
|