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


Use eclipselink.weaving.eager to specify if EclipseLink uses indirection on eager relationships.


Table 5-95 describes this persistence property's values.

Table 5-95 Valid Values for weaving.eager

Value Description


Enables indirection on eager relationships through weaving.


(Default) Disables indirection on eager relationships through weaving.


One-to-one and many-to-one mappings, even when configured with FetchType.EAGER, will effectively become "lazy."

You can use this extension only if weaving is configured to true or static. See "weaving" for more information.


Example 5-100 shows how to use this persistence property extension in the persistence.xml file.

Example 5-100 Using weaving in persistence.xml

<property name="eclipselink.weaving.eager" value="true"/>

Example 5-101 shows how to use this extension in a property map

Example 5-101 Using weaving in a Property Map

import org.eclipse.persistence.config.PersistenceUnitProperties;propertiesMap.put(PersistenceUnitProperties.WEAVING_EAGER, "true");

See Also

For more information, see: