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


query-results-cache.ignore-null

Use eclipselink.query-results-cache.ignore-null to specify if EclipseLink caches null query results


Values

Table 4-30 describes this query hint's values.

Table 4-30 Valid Values for query-results-cache.ignore-null

Value Description

true

Ignore null results (that is, do not cache results)

false

(Default) Do not ignore null results (that is, do cache results)



Usage

You can use this query hint to use query cache as a secondary key index, and allow inserts of new objects.


Examples

Example 4-61 Using query-results-cache.ignore-null in a JPA Query

import org.eclipse.persistence.config.HintValues;
 import org.eclipse.persistence.config.QueryHints;
 query.setHint("eclipselink.QUERY_RESULTS_CACHE_IGNORE_NULL", "TRUE");

Example 4-62 Using query-results-cache.ignore-null in a @QueryHint Annotation

import org.eclipse.persistence.config.HintValues;
 import org.eclipse.persistence.config.QueryHints;
 @QueryHint(name=QueryHints.QUERY_RESULTS_CACHE_IGNORE_NULL, value="TRUE");


See Also

For more information, see: