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


@FetchGroups

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

FetchGroup

(Required) An array of fetch groups (@FetchGroup)




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: