-->
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.  [ 2 posts ] 
Author Message
 Post subject: TOP-N Problem - How can Hibernate help?
PostPosted: Mon Oct 16, 2006 3:12 am 
Newbie

Joined: Mon Oct 16, 2006 2:34 am
Posts: 4
Since Sybase does not suport row-id I use the following to solve
a top-n problem.

Basically I want to be able to only retreive as many rows as the user
wants to see. Then, when he wants more, I retreive the next portion
of count rows. ( rows 20...40 beeing an example )

Code:
select rank = identity(10), gaotag, aotag
into #top
from hub_order
order by aotag desc
go
select gaotag
from #top
where rank between 20 and 40
go
drop table #top
go


How could Hibernate possibly help here?

Thanks
urs


Top
 Profile  
 
 Post subject: TOP-N Problem - How can Hibernate help?
PostPosted: Tue Oct 17, 2006 5:03 am 
Newbie

Joined: Mon Oct 16, 2006 2:34 am
Posts: 4
Apologies

I'm in the middle of HiA and I haven't got to chapter 7 yet.

There's the answer: pagination


I'm still curious how hibernate handles it....


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.