Type to start searching...
Class attribute's mapping to a relational database column
column : dbObjName
The database column to which the primitive attribute is mapped. Used only for primitive attributes.
The database column to which the primitive attribute is mapped. Used only for primitive attributes. The column must exist in the primary table, or in the "extension table" specified in the attribute mapping's table property.Valid values based on“string”. | |
---|---|
[A-Za-z][_A-Za-z\d]* |
destinationKey : string
A key from the destination class that provides a link between the associated class and this one. Used only for non-primitive attributes.
The meaning of the destination key varies by the associated class' persistence mapping.
For classes with a relationalDatabase persistence mapping, the destination table is usually the primary table of the attribute type's class (non-primitive), but may also be an extension table of that class. The key is a primary key or foreign key and is used to join from the destination table to the source table's foreign key or primary key respectively. Defaults to the primary key.
Person'homeAddress is of type Address. The Address class has a reverse association attribute of "person".
The persistence mapping for Person'homeAddress is:
sourceKey: Person.PK, destinationKey: Address.FK_person
The persistence mapping for Address'person is:
sourceKey: Address.FK_person, destinationKey: Person.PK
name : identifier
Attribute name to map to a database column
If the attribute is primitive, then the column property (and optionally the table property) are used to map to a database column.
If the attribute is non-primitive (i.e. it represents an association), the source key and destination keys specify the primary key / foreign key relationship used to navigate the association. If the association is two-way (i.e. has a reverse association), the persistence mapping on the other class's reverse attribute will use the same indexes, but the values will be switched for the source key and destination key .
Valid values based on“string”. | |
---|---|
:?[\p{L}_][\p{L}\p{N}_]*(:[\p{L}_][\p{L}\p{N}_]*)* |
Value must begin with a letter or an underscore. Case and length are not restricted. Letters, numbers and underscores are allowed. Colon is used as a scope separator. Spaces and other punctuation characters are not allowed. |
sourceKey : indexName
A key that provides the association between the source (this) and destination class. Used only for non-primitive attributes.
For relational datasources the source key is usually an index from the primary table for this class, but may also be an index from an "extension table". The index is a primary key or foreign key and is used to join from the source table to the destination's foreign key or primary key respectively. Defaults to the primary key.
Person'homeAddress is of type Address. The Address class has a reverse association attribute of "person" and is also
persisted to a RelationalDatasource.
The persistence mapping for Person'homeAddress is:
sourceKey: Person.PK, destinationKey: Address.FK_person
The persistence mapping for Address'person is:
sourceKey: Address.FK_person, destinationKey: Person.PK
Valid values based on“string”. | |
---|---|
[A-Za-z][_A-Za-z\d]*(\.[A-Za-z][_A-Za-z\d]*){0,2} |
table : tableName
The table containing the column to which the primitive attribute is mapped. Used only for primitive attributes.
This property defaults to the class's primary table if left blank. Only enter a name here if mapping to a column in an "extension table". An extension table shares its primary key on a one-to-one basis with the primary table's key. The framework transparently manages the creation, read, update, and delete of extension table records alongside the primary table records.Valid values based on“string”. | |
---|---|
[A-Za-z][_A-Za-z\d]*(\.[A-Za-z][_A-Za-z\d]*)? |
Choice of:
PersistenceMapping [1..1] - A persistence mapping specifies how instances are persisted in a given data source. The type of the specified data source determines the mapping structure.