Telerik OpenAccess Classic

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

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 one or more properties of the primary key column for a class using internal identity. This extension uses nested extensions (see db-column extension). If the type of the primary key column is not compatible with INTEGER then a db-key-generator is required to persist new instances.

Copy Code
<class name="Category">
    <extension key="db-primary-key">
        <extension key="db-column">
            <extension key="db-type" value="SMALLINT" />
        </extension>
    </extension>
</class>