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.  [ 1 post ] 
Author Message
 Post subject: paging problems with oracle 9
PostPosted: Thu Aug 13, 2009 1:59 am 
Newbie

Joined: Thu Aug 13, 2009 1:23 am
Posts: 3
Location: Israel
Hi guys, i have the following criteria:

Code:
            ICriteria tst = GetCriteria<Movment>(); //a private method which get it from my unitofwork
            tst.SetFirstResult(10);
            tst.SetMaxResults(10);
            List<Movement> lst = tst.List();


but NHibernate render the following oracle9 SQL statement:

SELECT * FROM (SELECT this_.MOV_ITEM_ID as MOV1_21_0_, this_.TRANSACTION_ID as TRANSACT2_21_0 FROM bwinv.MOVEMENT_ITEMS this_) WHERE rownum BETWEEN 10 AND 30

but this retrieves 0 results even though i have more than 100 items in this table.
the reason is that the first row which its rownum is 1, should be filtered out. But than the next row become the first row and get rownum=1 and therefore filtered out, and so on and so on.
did any one encountered this problem?


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

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.