Telerik OpenAccess Classic

Telerik OpenAccess ORM Send comments on this topic.
Getting the Root Type
See Also
Programmer's Guide > OpenAccess ORM Classic (Old API) > Telerik OpenAccess ORM OQL Reference > OQL - Object Query Language > Getting the Root Type

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 IQuery.RootType property gets the root type of the query result, when the query returns only instances of persistence-capable classes. The returned type is the common type of all returned persistence-capable instances (enhanced classes). If no common type exists (for example by use of a projection), null is returned.

Here is an example of printing the Root Class for an OQL query:

C# Copy Code
IObjectScope scope =OpenAccessData.ObjectScopeProvider1.GetNewObjectScope();
string query = "SELECT * FROM OrderExtent";
IQuery querry = scope.GetOqlQuery(query);
VB .NET Copy Code
Dim scope As IObjectScope = OpenAccessData.ObjectScopeProvider1.GetNewObjectScope()
Dim query As String = "SELECT * FROM OrderExtent"
Dim querry As IQuery = scope.GetOqlQuery(query)

See Also