资 源 简 介
Hibernate 可以实现分页查询,例如:
从第2万条开始取出100条记录
Query q = session.createQuery("from Cat as c")
q.setFirstResult(20000)
q.setMaxResults(100)
List l = q.list()
-Hibernate paging query can be achieved, for example: starting from the first 20000 records of 100 out Query q = session.createQuery ( " from Cat as c" ) q.setFirstResult (20000) q.setMaxResults (100) List l = q.list ()