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?