Use eclipselink.sql.hint
to include an SQL hint in the SQL for a query.
Values
Table 4-39 describes this query hint's values.
Table 4-39 Valid Values for sql.hint
Value | Description |
---|---|
value |
The full hint string, including the comment \ delimiters |
Usage
A SQL hint can be used on certain database platforms to define how the query uses indexes and other such low level usages. The SQL hint will be included in the SQL, after the SELECT
/INSERT
/UPDATE
/DELETE
command.
Examples
Example 4-79 shows how to use this hint in a JPA query.
Example 4-80 shows how to use this hint with the @QueryHint
annotation.
See Also
For more information, see:
"Query Hints" in Understanding EclipseLink
"Query" in Solutions Guide for EclispeLink
Section 10.3.1 "NamedQuery Annotation" in the JPA Specification (http://jcp.org/en/jsr/detail?id=317
)