java - Hibernate Skip and take some rows -
how let's 20-35 rows fromt eh table?
how can select in hibernate?
something that:
mytable.skip(20).take(15);
thanks.
a combination between query#setfirstresult(int i)
, query#setmaxresults(int i)
skip first 20
records , fetch next 15
(as shown in example) :
list<table> page3 = session.createquery( "from table") .setfirstresult(20) .setmaxresults(15).list();
Comments
Post a Comment