Use @FetchGroups
to define a group of @FetchGroup
.
Annotation Elements
Table 2-23 describes this annotation's elements.
Table 2-23 @FetchGroups Annotation Elements
Annotation Element | Description | Default |
---|---|---|
|
(Required) An array of fetch groups ( |
Usage
You can specify @FetchGroups
on an Entity or MappedSuperclass.
You can also enable or disable fetch groups through weaving for the persistence unit.
Examples
See "@FetchGroup" for an example of using fetch groups.
Example 2-47 shows how to configure fetch groups in the persistence unit persistence.xml
file or by importing a property
map.
Example 2-47 Specifying Fetch Groups in persistence.xml
Using persistence.xml
file:
<property name="eclipselink.weaving.fetchgroups" value="false"/>
Using property
map:
import org.eclipse.persistence.config.PersistenceUnitProperties; propertiesMap.put(PersistenceUnitProperties.WEAVING_FETCHGROUPS, "false");
See Also
For more information, see: