Some hints are only effective in certain scenarios, which is noted on each constant's documentation.
API Note
The stringly-typed hints defined here correspond to typesafe operations of Hibernate's native APIs, and should not be used unless portability between JPA implementations is of very great importance.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | HINT_BATCH_FETCH_SIZE
Hint to set the batch size for batch fetching for a given
|
| public static final String | HINT_CACHE_MODE
Hint for specifying the |
| public static final String | HINT_CACHE_REGION
Hint for specifying the region of the query cache into which the results should be stored. |
| public static final String | HINT_CACHEABLE
Hint for specifying whether results from a query should be stored in the query cache. |
| public static final String | HINT_CALLABLE_FUNCTION
Whether to treat a |
| public static final String | HINT_COMMENT
Hint for specifying a database comment to be appended to the SQL statement sent to the database. |
| public static final String | HINT_ENABLE_SUBSELECT_FETCH
Hint to enable subselect fetching for a given
|
| public static final String | HINT_FETCH_PROFILE
Hint to enable a fetch profile for a given
|
| public static final String | HINT_FETCH_SIZE
Hint for specifying a JDBC fetch size to be applied to the statement. |
| public static final String | HINT_FLUSH_MODE
Hint for specifying the |
| public static final String | HINT_FOLLOW_ON_LOCKING
Hint to enable or disable the follow-on locking mechanism provided
by |
| public static final String | HINT_JDBC_BATCH_SIZE
Hint to set the batch size for JDBC batching for a given
|
| public static final String | HINT_NATIVE_LOCK_MODE
Hint for specifying the lock mode to apply to the results of a native query. |
| public static final String | HINT_NATIVE_SPACES
Hint for specifying the query spaces that affect the results of a native query. |
| public static final String | HINT_QUERY_PLAN_CACHEABLE
Hint to enable or disable the query plan caching. |
| public static final String | HINT_READ_ONLY
Hint for specifying that objects loaded into the persistence context as a result of a query should be associated with the persistence context in read-only mode. |
| public static final String | HINT_TENANT_ID
Hint for specifying the tenant id to use when creating an
|
| public static final String | HINT_TIMEOUT
Hint for specifying a query timeout, in seconds. |
| HINT_BATCH_FETCH_SIZE | back to summary |
|---|---|
| public static final String HINT_BATCH_FETCH_SIZE Hint to set the batch size for batch fetching for a given
| |
| HINT_CACHE_MODE | back to summary |
|---|---|
| public static final String HINT_CACHE_MODE Hint for specifying the Implementation Specification No effect unless | |
| HINT_CACHE_REGION | back to summary |
|---|---|
| public static final String HINT_CACHE_REGION Hint for specifying the region of the query cache into which the results should be stored. Implementation Specification No effect unless | |
| HINT_CACHEABLE | back to summary |
|---|---|
| public static final String HINT_CACHEABLE Hint for specifying whether results from a query should be stored in the query cache. | |
| HINT_CALLABLE_FUNCTION | back to summary |
|---|---|
| public static final String HINT_CALLABLE_FUNCTION Whether to treat a | |
| HINT_COMMENT | back to summary |
|---|---|
| public static final String HINT_COMMENT Hint for specifying a database comment to be appended to the SQL statement sent to the database. Implementation Specification Not valid for | |
| HINT_ENABLE_SUBSELECT_FETCH | back to summary |
|---|---|
| public static final String HINT_ENABLE_SUBSELECT_FETCH Hint to enable subselect fetching for a given
| |
| HINT_FETCH_PROFILE | back to summary |
|---|---|
| public static final String HINT_FETCH_PROFILE Hint to enable a fetch profile for a given
| |
| HINT_FETCH_SIZE | back to summary |
|---|---|
| public static final String HINT_FETCH_SIZE Hint for specifying a JDBC fetch size to be applied to the statement. | |
| HINT_FLUSH_MODE | back to summary |
|---|---|
| public static final String HINT_FLUSH_MODE Hint for specifying the | |
| HINT_FOLLOW_ON_LOCKING | back to summary |
|---|---|
| public static final String HINT_FOLLOW_ON_LOCKING Hint to enable or disable the follow-on locking mechanism provided
by
A value of
| |
| HINT_JDBC_BATCH_SIZE | back to summary |
|---|---|
| public static final String HINT_JDBC_BATCH_SIZE Hint to set the batch size for JDBC batching for a given
| |
| HINT_NATIVE_LOCK_MODE | back to summary |
|---|---|
| public static final String HINT_NATIVE_LOCK_MODE Hint for specifying the lock mode to apply to the results of a native query.
Accepts either a API Note While Hibernate supports applying a lock mode to a
native query, the JPA specification requires that
| |
| HINT_NATIVE_SPACES | back to summary |
|---|---|
| public static final String HINT_NATIVE_SPACES Hint for specifying the query spaces that affect the results of a native query. Passed value can be any of:
Typically, these are the names of tables which are referenced by the query. | |
| HINT_QUERY_PLAN_CACHEABLE | back to summary |
|---|---|
| public static final String HINT_QUERY_PLAN_CACHEABLE Hint to enable or disable the query plan caching.
By default, query plan caching is enabled for HQL queries
and immutable criteria queries i.e. created with
Setting this property to
Note that setting this property to
| |
| HINT_READ_ONLY | back to summary |
|---|---|
| public static final String HINT_READ_ONLY Hint for specifying that objects loaded into the persistence context as a result of a query should be associated with the persistence context in read-only mode. | |
| HINT_TENANT_ID | back to summary |
|---|---|
| public static final String HINT_TENANT_ID Hint for specifying the tenant id to use when creating an
| |
| HINT_TIMEOUT | back to summary |
|---|---|
| public static final String HINT_TIMEOUT Hint for specifying a query timeout, in seconds. | |