Telerik OpenAccess Classic

Telerik OpenAccess ORM Send comments on this topic.
How to: Use FetchPlans for One to Many Relationship
See Also
Programmer's Guide > OpenAccess ORM Classic (Old API) > Programming With OpenAccess > FetchPlans and FetchGroups > How to: Use FetchPlans for One to Many Relationship

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.

In scenarios when you want to retrieve referenced objects in a single query, where there is a 1 to many relationship, you have to set ParallelFetch to True on your query definition. For example, if you want to get an Order object and have the OrderDetail objects for that Order pre-loaded in a single query, then your code should look like the code-snippet below:

C# Copy Code
var query = from o in objectScope.Extent<Order>().ParallelFetch(true)
           where ...
           select o;

See Also