Use eclipselink.cache-usage.indirection-policy
(with cache-usage) to configure in-memory querying and conforming's treatment of uninstantiated indirection/lazy relationships.
Values
Table 4-4 describes this query hint's values.
Table 4-4 Valid Values for cache-usage.indirection-policy
Value | Description |
---|---|
|
If conforming encounters an uninstantiated indirection/lazy object, it is assumed to conform. |
|
(Default) If conforming encounters an uninstantiated indirection/lazy object an exception is thrown. |
|
If conforming encounters an uninstantiated indirection/lazy object it is assumed to not conform. |
|
If conforming encounters an uninstantiated indirection/lazy object it is triggered. |
Usage
This hint applies only when the query traverses a join
across a lazy relationship.
Examples
Example 4-9 Using cache-usage.indirection-policy in a JPA Query
query.setHint(QueryHints.INDIRECTION_POLICY, CacheUsageIndirectionPolicy.Trigger);
Example 4-10 Using cache-usage.indirection-policy in a @QueryHint Annotation
@QueryHint(name=QueryHints.INDIRECTION_POLICY, value=CacheUsageIndirectionPolicy.Trigger)
See Also
For more information, see:
"EclipseLink" JPA Query Hints
http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Querying/Query_Hints
"EclipseLink Caches" in Understanding EclipseLink
"Querying" in Solutions Guide for EclispeLink