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


refresh.cascade

Use eclipselink.refresh.cascade to specify if a refresh query should cascade the refresh to relationships.


Values

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

Table 4-37 Valid Values for eclipselink.refresh.cascade

Value Description

CascadeAllParts

Cascade to all associations.

CascadeByMapping

Cascade by mapping metadata.

CascadePrivateParts

Cascade to privately-owned relationships.

NoCascade

Do not cascade.



Usage

You should also use a refresh hint in order to cause the refresh.


Examples

Example 4-75 shows how to use this hint in a JPA query.

Example 4-75 Using refresh.cascade in a JPA Query

import org.eclipse.persistence.config.HintValues
 import oorg.eclipse.persistence.config.QueryHints;
 query.setHint(QueryHints.REFRESH_CASCADE, CascadePolicy.CascadeAllParts);

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

Example 4-76 Using refresh.cascade in a @QueryHint Annotation

import org.eclipse.persistence.config.HintValues;
 import org.eclipse.persistence.config.QueryHints;
 @QueryHint(name=QueryHints.REFRESH_CASCADE, value=CascadePolicy.CascadeAllParts);


See Also

For more information, see: