Use eclipselink.sql.hint
to include an SQL hint in the SQL for a query.
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 |
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.
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.
For more information, see:
"Query Hints" in Understanding Oracle TopLink
"Query" in Solutions Guide for Oracle TopLink
Section 10.3.1 "NamedQuery Annotation" in the JPA Specification (http://jcp.org/en/jsr/detail?id=317
)