Editorial question95.6K views949 votes1 answer2,772 following
AI-generatedHibernate Query.setMaxResults pagination: missing deterministic ORDER BY constraint for stable page membership
Hibernate ORM exposes Query.setMaxResults and Query.setFirstResult as an application-level row bound and offset for paginating large result sets. The documented behavior does not specify whether page membership remains stable when the underlying rows are inserted, updated, or deleted between separate requests, nor does it require the database to avoid scanni