Property Editor

This dialog box allows you to create and edit properties.

To call Property Editor, use one of the following options:

In the Model Explorer window or in the diagram right-click the required class or complex type to call its context menu, and in the Add submenu select New Property.
In the Model Explorer window or in the diagram select the required class or complex type and press ALT+P.
In the Model Explorer window or in the diagram right-click an existing property and in its context menu select Edit.

Images_PropertyEditorNH

The following options are available:

Name - set the property name here.

Type - set the property type.

Access - select a type of access. Can accept the following values: Property, Default, Field, Nosetter.

Primary Key - specifies that this property is a primary key.

Version - specifies that this property holds the row version.

Nullable - specifies whether this property value is nullable.

Column - specifies the name of the mapped database table column.

Formula - specifies an SQL expression that defines the value for a computed property.

Unsaved value - this property is available only for Primary Key properties or for properties with Version=True.

It is a property value which indicates that an instance is newly instantiated (unsaved), distinguishing it from detached instances that were saved or loaded in a previous session.

The allowed values of unsaved value are:

any - always save.
none - always update.
null - save when identifier is null.
valid identifier value - save when identifier is null or equals the user-defined value.
undefined - if set for version or timestamp, then identifier check is used.

Generator - specifies the strategy to be used when generating unique IDs for each row. Can accept the following values: assigned (the generator set for the whole model), foreign, guid, guid.comb, guid.native, hilo, identity, increment, native, select, seqhilo, sequence, sequence-identity, uuid.hex, uuid.string and custom.

Generated - (available for non-key properties) specifies whether this property value as actually generated by the database. Can accept the following values: Never, Insert, or Always.

Insert - (available for non-key properties) specifies that the mapped columns should be included into an SQL INSERT statement. Can accept the following values: True or False.

Update - (available for non-key properties) specifies that the mapped columns should be included into an SQL UPDATE statement. Can accept the following values: True or False.

Optimistic lock - (available for non-key properties) specifies whether updates to this property require acquisition of the optimistic lock. Can accept the following values: True or False.

 

ExpandedToggleIcon        See Also


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.