-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Hibernate Pagination
PostPosted: Thu Aug 05, 2004 3:57 am 
Regular
Regular

Joined: Tue Mar 23, 2004 2:10 am
Posts: 51
Hello,
We are currently using Hibernate in 3 tire architecture with Swing client on front end. We are using pagination from Hiberanate framework (Oracle db)
and it is working excellent. Now the problem lies in the fact that on clinet we are displaying 100 records at time with next previous button....but we have to show the client total number of records the query returned. So on back end DAO i have to do two quries the count of results and actual results. To optimize the things we run the count quer once in the first iteration. I think it wil be convinient for us if hibernate returns the no. of records itself beacuse we have to write number of lines of code to incorporate this as we are using dyanmic queirs. So a feature request

Regards,
Shoaib Akhtar


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 05, 2004 6:25 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
This surely won't happen. Do your count queries yourself.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 05, 2004 8:55 am 
Regular
Regular

Joined: Tue Mar 23, 2004 2:10 am
Posts: 51
Hello,
Thanks for your reply. It was only a suggestion... a very humble one.... can hibernate have a boolean to return the count from query (in that case hibernate may made second query for getting count ) by default it wil be false so no overhead.can we?

Regards,
Shoaib Akhtar


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 05, 2004 10:38 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I wrap this type of business function in helper methods/class. I don't think it belongs in hibernate itself.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.