Telerik OpenAccess Classic

Telerik OpenAccess ORM Send comments on this topic.
FetchField Attribute
Programmer's Guide > OpenAccess ORM Classic (Old API) > Programming With OpenAccess > Attributes > Field Attributes > FetchField Attribute

Glossary Item Box

This documentation article is a legacy resource describing the functionality of the deprecated OpenAccess Classic only. The contemporary documentation of Telerik OpenAccess ORM is available here.

The [FetchField] attribute is used to mark fields to be included in the named FetchGroup (refer to FetchGroups for more information). All the fields that are marked with this attribute will be loaded, along with the object, when it is initially retrieved from the database, as a result of a query or while resolving a reference (Refer to FetchField Attribute for more information). You can use the Fetch Group tab of the Forward Mapping Dialog to specify the fields that should be part of the named FetchGroup.

The FetchGroup definition can be written to either the XML file (App.config) or to the source code (using the FetchField attribute). Use the Options Dialog to specify the location of the fetchgroup definition.

By default the fetchgroup definition is written to the source code, using the [FetchField] attribute. The settings specified in the Options Dialog would be applicable only for new entries, i.e., only when you make any change to the fetchgroup definition will the entries for that particular fetchgroup be made as per your settings.