Hello Kunal,

We use the criteria object the same way you do and we were thinking about implementing a resultsCount() (or count()) method ourselves since it seems so useful. However, we have not been able to work on this yet. We would greatly appreciate if you added this functionality.

Cheers,
Adrian


On Jul 22, 2004, at 1:21 AM, Kunal Parikh wrote:

Hi !

I am currently narrowing my sql criteria by using Criteria.add( ... ).

I am still getting a rather large resultset and the hydrating of POJOs takes forever.

Which is why, I am now using Criteria.setFirstResult and Criteria.setMaxResults. This way, I only retrieve (and hence hydrate) the POJOs I require.

My problem:
===========
Now, I wish to use the same query to retrieve the count of my query.

Do you guys think it is worthwhile to add a resultsCount() method in Criteria, that'll do a count(*) using the same where clause and return an Integer ?

I would like to code this functionality in, if people on this list validate the concept.



TIA,

Kunal




------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel



------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel

Reply via email to