Telerik OpenAccess Classic

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

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 for a column in a table. The optional value attribute, specifies the type of database that the mapping applies to or if it applies to all databases, if the database is not specified. So, you will only need one db-column extension unless you require different mappings for different database types.

The example below sets the length (precision) and scale of a System.Decimal field to (10,4) for all databases except Oracle, which is set to (12,4). OpenAccess ORM will use a NUMERIC column for the field by default so there is no need to specify the type of the column. Normally it is best to let OpenAccess ORM choose as many things as possible as this will result in a portable database schema:

Copy Code
<field name="qty">
    <extension key="db-column">
        <extension key="db-length" value="10" />
        <extension key="db-scale" value="4" />
    <extension key="db-column" value="oracle">
        <extension key="db-length" value="12" />
        <extension key="db-scale" value="4" />

Valid child extensions:

Child Extension



Sets the name of the column. The name generator for the datastore of the table provides the default name.


Supported database datatypes


Backend specific database types, i.e. MS SQL Server types, MySQL Server Types or Oracle types (Refer to Mapping a Simple Field for the various mappings).

The value of this extension should contain one of the "n-types" like nvarchar, if you want to have Unicode support with sql server.


Length (or precision)


Scale (digits after the decimal point)