Telerik OpenAccess Classic

Telerik OpenAccess ORM Send comments on this topic.
Persistent Interfaces
Programmer's Guide > OpenAccess ORM Classic (Old API) > Programming With OpenAccess > Mapping > Classes > Persistent Interfaces

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.

You can add interfaces to your project in the same way that classes are added, by declaring the[Persistent] attribute. For using persistent interfaces, you first need to declare your interface as persistent and then use it as type for members of persistent classes. A persistent interface is used to get an Extent of all classes that implement the interface. The interfaces themselves are not persistent (as they have no fields) but references to persistent interfaces (e.g. "private MyInterface ref") are persistent by default.

Persistent interfaces are displayed in the tree view of the project. The mapping of the references themselves is explained in Mapping an Interface or Object Reference section below.

A sample of the XML metadata is shown below:

Copy Code
<namespace name="model">
<class name="Resturant" />
<class name="Supplier" />
<class name="Address" />
<extension key="interface" value="HasAddress" />

Currently OpenAccess ORM does not support Collections and Maps of interface types or queries against the extent of an interface type (i.e. using an interface as the candidate class for a query).