Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Object Relational Mapping
Hibernate: Copying or cloning criteria object for pagination
Joined: Aug 20, 2003
May 20, 2010 09:03:38
I am trying to implement pagination using Hibernate. I need to execute two criterias; one to return the rowCount and the other to execute the query itself.
I don't want to create two criteria objects, because it is redundant and some of my criteria are quite complicated with joins.
Is there any way to clone the criteria object?
On the hibernate forum, some suggests to use DetachedCriteria then Serialize and DeSerialize it; to me, it is very inefficient and slow.
I am using Hibernate 3.2
SCJD 1.4<br />SCJP 1.4<br />-----------------------------------<br />"With regard to excellence, it is not enough to know, but we must try to have and use it.<br />" Aristotle
rocket mass heater
subject: Hibernate: Copying or cloning criteria object for pagination
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013