Loading
Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.4
  Go To Table Of Contents
Contents
 Search
Other Searches
 PDF
PDF
Comments
Comments


cache-usage.indirection-policy

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

Conform

If conforming encounters an uninstantiated indirection/lazy object, it is assumed to conform.

Exception

(Default) If conforming encounters an uninstantiated indirection/lazy object an exception is thrown.

NotConform

If conforming encounters an uninstantiated indirection/lazy object it is assumed to not conform.

Trigger

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:

Comments powered by Disqus