Skip to main content

SqlTableName

Specifies the name of the SQL table to which this class is projected. Applies only to persistent classes.

Usage

To override the default name of the SQL table to which this class is projected, use the following syntax:

Class MyApp.Person Extends %Persistent [ SqlTableName = DBTable ]  { //class members }

Where DBTable is a valid SQL identifier.

Details

This keyword specifies the name of the SQL table to which this class is projected. By default, the SQL table name is the same as the class name.

Typically you use this keyword when the class name is a SQL reserved word (not uncommon) or if you want the SQL table to contain characters not supported by class names (such as the “_” character).

Effect on Subclasses

This keyword is not inherited.

Default

If you omit this keyword, the class name is used as the SQL table name.

See Also

FeedbackOpens in a new tab