diff --git a/hibernate-core/src/main/java/org/hibernate/query/SelectionQuery.java b/hibernate-core/src/main/java/org/hibernate/query/SelectionQuery.java index 9298ea2c83..92da7f047f 100644 --- a/hibernate-core/src/main/java/org/hibernate/query/SelectionQuery.java +++ b/hibernate-core/src/main/java/org/hibernate/query/SelectionQuery.java @@ -80,10 +80,23 @@ import org.hibernate.graph.GraphSemantic; * *

* The special built-in fetch profile named - * {@value DefaultFetchProfile#HIBERNATE_DEFAULT_PROFILE} adds - * a fetch join for every {@link jakarta.persistence.FetchType#EAGER eager} - * {@code @ManyToOne} or {@code @OneToOne} association belonging to an entity - * returned by the query. + * {@value DefaultFetchProfile#HIBERNATE_DEFAULT_PROFILE} adds a fetch join for + * every {@link jakarta.persistence.FetchType#EAGER eager} {@code @ManyToOne} or + * {@code @OneToOne} association belonging to an entity returned by the query. + *

+ * Finally, two alternative approaches to pagination are available: + *

    + *
  1. + * The operations and {@link #setOrder(List)} and {@link #setPage(Page)}, together + * with {@link Order} and {@link Page}, provide a streamlined API for offset-based + * pagination, at a slightly higher semantic level than the ancient but dependable + * {@link #setFirstResult(int)} and {@link #setMaxResults(int)}. + *
  2. + * On the other hand, {@link KeyedPage} and {@link KeyedResultList}, along with + * {@link #getKeyedResultList(KeyedPage)}, provide for key-based pagination, + * which can help eliminate missed or duplicate results when data is modified + * between page requests. + *
* * @author Steve Ebersole */