Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Talk:EclipseLink/Development/Incubator/Extensions/NestedFetchGroup
Revision as of 16:00, 8 January 2010 by Douglas.clarke.oracle.com (Talk | contribs) (Annotation & XML support)
Annotation & XML support
In bug 211322 support for defining named FetchGroups using annotations and/or XML is being defined. To be sure the nested case is covered I would propose that we could do something like:
Example 1: Specifying Use of Dynamic FG
@FetchGroup(name="emp-fg1", attributes={"firstName", "lastName", "salary", "gender"}, groups={@FethGroup(name="address", attributes={"city"})})
In example 1 the FetchGroup specified in groups is considered dynamic since it provides a list of attributes. In this case the name will be considered the attribute name on the source object to apply this FG to.
Example 2: Specifying Use of Named FG
@FetchGroup(name="emp-fg2", attributes={"firstName", "lastName", "salary", "gender"}, groups={@FethGroup(name="addr-fg1")}) @Entity public class Employee { ... @FetchGroup(name="addr-fg1", attributes={"city"}) @Entity public class Address {
In example 2 the nested FG has no attributes so the name specified is meant to reference a named FG defined on Address.