Telerik OpenAccess Classic

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

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.

Sets properties of the link table used to store a collection, map or array field. This extension supports the following nested extensions (defaults apply if not present):

Nested extension

Description

db-table-name

The name of the link table

db-owner-ref

The column(s) that reference the class containing the field that the link table is for. If the owning class has a composite primary key then use nested db-ref extensions to change the column properties (see db-ref . Otherwise use db-column extensions

db-sequence

The sequence number column for collections that are ordered (e.g. Lists) to maintain the ordering. Use nested db-column extensions (see db-column extension) to change the properties of this column

db-key

The key column(s) for maps. If the key is a simple type (e.g. String) or a reference to a persistence capable class with a single column primary key then use nested db-column extensions to change column properties (see db-column extension). If the key is a reference to a composite primary key class then use nested db-ref extensions (see db-ref)

db-value

The value column(s). If the value or element is a simple type (e.g. String) or a reference to a persistence capable class with a single column primary key then use nested db-column extensions to change column properties (see db-column extension). If the value is a reference to a composite primary key class then use nested db-ref extensions (see db-ref)

Here is an example for the link table for a List of Strings. The name of the table is set to 'user_email' and the type of the sequence column is SMALLINT and its name is 'priority':

Copy Code
<field name="emailAddressList">
    <collection element-type="System.String">
        <extension key="db-link-table">
            <extension key="db-table-name" value="user_email" />
            <extension key="db-sequence">
                <extension key="db-column">
                    <extension key="db-column-name" value="priority" />
                    <extension key="db-type" value="SMALLINT" />
                </extension>
            </extension>
            <extension key="db-value">
                <extension key="db-column">
                    <extension key="db-column-name" value="email" />
                </extension>
            </extension>
        </extension>
    </collection>
</field>