Use eclipselink.jdbc.first-result
to specify if the query should skip the specified number of rows in the result.
Values
Table 4-16 describes this query hint's values.
Table 4-16 Valid Values for jdbc.first-result
Value | Description |
---|---|
Integer |
The position of the first result to retrieve. |
Usage
This query hint is similar to JPA Query setFirstResults()
, but can be set in metadata for NamedQuerys
.
Examples
Example 4-34 Using jdbc.first-result in a JPA Query
import org.eclipse.persistence.config.HintValues; import org.eclipse.persistence.config.QueryHints; query.setHint("eclipselink.JDBC_FIRST_RESULT", "10");
See Also
For more information, see:
"Query Concepts" in Understanding EclipseLink