Use eclipselink.refresh
to specify whether or not to update the Oracle TopLink session cache with objects returned by the query.
Table 4-36 describes this query hint's valid values.
Table 4-36 Valid Values for eclipselink.refresh
Value | Description |
---|---|
|
Refresh the cache. |
|
(Default) Do not refresh the cache. |
Example 4-73 shows how to use this hint in a JPA query.
Example 4-73 Using refresh in a JPA Query
import org.eclipse.persistence.config.HintValues;
import org.eclipse.persistence.config.QueryHints;
query.setHint(QueryHints.REFRESH, HintValues.TRUE);
Example 4-74 shows how to use this hint with the @QueryHint
annotation.
Example 4-74 Using refresh in a @QueryHint Annotation
import org.eclipse.persistence.config.HintValues;
import org.eclipse.persistence.config.QueryHints;
@QueryHint(name=QueryHints.REFRESH, value=HintValues.TRUE);
For more information, see: