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


batch.size

Use eclipselink.batch.size to configure the batch size when using batch.type set to IN.


Values

Table 4-1 describes this persistence property's values.

Table 4-1 Valid Values for

Value Description

Size

The number of keys in each IN clause

Default: 256 or the query's pageSize (for cursor queries)



Examples

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

Example 4-3 Using batch.size in a JPA Query

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

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

Example 4-4 Using batch.size in a @QueryHint Annotation

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


See Also

For more information, see: