posted 14 years ago
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
Thanks,
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