Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.5
  Go To Table Of Contents
 Search
 PDFComments
Comments


refresh

Use eclipselink.refresh to specify whether or not to update the EclipseLink session cache with objects returned by the query.


Values

Table 4-36 describes this query hint's valid values.

Table 4-36 Valid Values for eclipselink.refresh

Value Description

FALSE

Refresh the cache.

FALSE

(Default) Do not refresh the cache.



Examples

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);


See Also

For more information, see: