HQL select range of results
问题 What is the correct/efficient way to retrieve a sub set of results from hibernate? Assuming that products is a table containing a 3000 records. Session session = SessionFactorys.getSessionFactory().openSession(); Query query = session.createQuery("from products p"); List result = query.list().subList(30, 40); session.disconnect(); The code above dose not seem to be very efficient is there a better way, I am trying to find something like. Query query = session.createQuery("from products p