Use eclipselink.batch.type
to specify the type of batch fetching the query should use for any batch-fetched relationships.
Values
Table 4-2 describes this query hint's values.
Table 4-2 Valid Values for batch.type
Value | Description |
---|---|
|
(Default) The original query's selection criteria is joined with the batch query. |
|
Uses an SQL |
|
Uses an SQL |
Examples
Example 4-5 shows how to use this hint in a JPA query.
Example 4-5 Using batch.type in a JPA Query
import org.eclipse.persistence.config.HintValues; import org.eclipse.persistence.config.QueryHints; query.setHint("eclipselink.BATCH_TYPE", "EXISTS");
Example 4-6 shows how to use this hint with the @QueryHint
annotation.
Example 4-6 Using batch.type in a @QueryHint Annotation
import org.eclipse.persistence.config.HintValues; import org.eclipse.persistence.config.QueryHints; @QueryHint(name=QueryHints.BATCH_TYPE, value="EXISTS");
See Also
For more information, see: