Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.4
  Go To Table Of Contents


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


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-79 Using sql.hint in a JPA Query

Example 4-80 shows how to use this hint with the @QueryHint annotation.

Example 4-80 Using sql.hint in a @QueryHint Annotation

See Also

For more information, see: