Skip to main content
Previous sectionNext section

SqlRowIdName

Overrides the default SQL field name for the ID column for this class. Applies only to persistent classes.

Usage

To override the default SQL field name for the ID column of this class, use the following syntax:

Class MyApp.MyClass [ SqlRowIdName = MyId ]  { //class members }

Where MyId is an SQL identifier.

Details

This keyword overrides the default SQL field name used for the ID column.

When a persistent class is projected as an SQL table, the Object Identity value for each object is projected as an SQL column — the Row ID column. By default, the Row ID column is called ID. If the class has another field named ID, then ID1 is used (and so on). The SqlRowIdName keyword lets you set the name of the Row ID column directly.

Effect on Subclasses

This keyword is inherited from the primary superclass. The subclass can override the value of the keyword.

Default

If you omit this keyword, the SQL field name for the ID column for this class is ID

See Also