Telerik OpenAccess Classic

Telerik OpenAccess ORM Send comments on this topic.
db-ref
Programmer's Guide > OpenAccess ORM Classic (Old API) > Programming With OpenAccess > Metadata Extension Reference > db-ref

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.

Defines column properties for part of a reference to a multiple field identity class using a composite primary key. You must supply one db-ref extension for each field in the referenced classes primary key, and the value attribute of each must contain the name of the field. Composite primary keys are not supported for internal identity classes. This extension may contain zero or more nested extensions (see db-column extension) to change the default column properties.

Here is an example for a reference to the Customer class, which has a composite primary key consisting of branch and code. The code column from the reference is renamed customer_code:

Copy Code
<field name="customer">
    <extension key="db-ref" value="branch" />
    <extension key="db-ref" value="code">
        <extension key="db-column">
            <extension key="db-column-name" value="customer_code" />
        </extension>
    </extension>
</field>