A default FetchGroup is created for each class, and it will retrieve all the fields that are of basic type or single reference type (only the id of the referenced object will be retrieved), as a result of a query or while resolving a reference. The default FetchGroup will not retrieve any collections, hashtables or blobs.
||In case of reference type fields, only the id of the referenced object is fetched from the database. The referenced object itself will only be fetched when it is actually accessed. When a referencing object is used as a parameter in the Retrieve method, the Retrieve method could fail, if the referenced sub-object is not accessible.|
So, the default FetchGroup is the set of fields that are retrieved, if any field of the object is accessed the very first time. Fields that are not part of the default FetchGroup; will be loaded on demand, when they are accessed for the first time.
It is possible to include or exclude fields from a default FetchGroup, and thereby control the fields retrieved, by using the DefaultFetchGroup attribute. Refer to DefaultFetchGroup Attribute for more information.
For example, a string field that contains a typically large document can be marked with the DefaultFetchGroup attribute set to false, and so it will not be part of the default FetchGroup, and the field will be loaded only when accessed by the application. This can be done as under:
[DefaultFetchGroup( false )]
private string name;
Private name As String