Skip Headers

# Using Queries With Fetch Groups

Previous

Next

You can use a fetch group with a `ReadObjectQuery` or `ReadAllQuery`. When you execute the query, TopLink retrieves only the attributes in the fetch group. TopLink automatically executes a query to fetch all the attributes excluded from this subset when and if you call a getter method on any one of the excluded attributes.

Note: Fetch groups are only supported with CMP.

This section describes the following:

- Configuring Default Fetch Group Behavior

- Querying With a Static Fetch Group

- Querying With a Dynamic Fetch Group

For more information about fetch groups, see "Fetch Groups and Object-Level Read Queries".