All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.openjpa.persistence.jest.help.fetch-plan.html Maven / Gradle / Ivy

The newest version!





Dynamic Fetch Plan

Specify one or more named fetch plan. Separate multiple names with comma, e.g.

myPlanA, mYPlanB

There are two pre-defined plans named: default and all. The default plan that fetches all properties of basic type (i.e. String, int, Date etc.) and uni-cardinality relations, are active by default. As the plans are additive, to exclude the default plan, you can specify

myPlanA, -default

Fetch Plan determines which properties will be fetched when an entity instance is accessed from the data store. A plan can traverse relationship path into other entities at arbitrary depth. By default, when an entity is fetched, all properties of basic type (i.e. String, int, Date etc.) and uni-cardinality relations are fetched.
JPA specification allows @Fetch.LAZY and @Fetch.EAGER annotation on persistent properties to control fetch behavior. But only statically i.e. at class definition.

OpenJPA, on the other hand, provides a far richer syntax and semantics to its user to define the properties to be fetched through its dynamic Fetch Plan facility. And, more importantly, these fetch plans can be modified dynamically per use case basis.

To learn more aboout Fetch Plan, Refer OpenJPA documentation.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy