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:
<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).