Class Editor

This dialog box allows you to create and edit classes, add or delete their properties.

To call Class Editor, double-click the class on the diagram or in the Model Explorer, or select Edit from the class shortcut menu.

The Class Editor dialog box will be displayed.

Images_class_editorNH

The following options are available:

Name - the fully qualified .NET class name of the persistent class (or interface), including its assembly name.

Table - the name of its database table.

Modifier - specifies the identifier. Acceptable values are Public and Internal.

Schema - (optional): overrides the schema name specified by the root <hibernate-mapping> element.

Abstract - specifies whether the class is abstract.

Mutable - (optional, defaults to true): specifies that instances of the class are (not) mutable.

Dynamic Insert - (optional, defaults to false): specifies that INSERT SQL should be generated at runtime and contain only the columns whose values are not null.

Dynamic Update - (optional, defaults to false): specifies that UPDATE SQL should be generated at runtime and contain only those columns whose values have changed.

Select before Update - (optional, defaults to false): specifies that NHibernate should never perform an SQL UPDATE unless it is certain that an object is actually modified. In certain cases (actually, only when a transient object has been associated with a new session using update()), this means that NHibernate will perform an extra SQL SELECT to determine if an UPDATE is actually required.

View

Selecting a view allows you to view and edit specific parameters for class or type properties inside the Class Editor without opening Property Editor. The following views are available.

General

Allows you to edit main property parameters, such as its type, server data type, corresponding column name, nullability, whether it is a part of Entity Key, whether it is read-only.

Presentation

Allows you to edit property display name.

Validation

Allows you to edit property validation settings - whether its value must be set, its format, min and max length for string data types, min and max value for numeric data types.

Properties - lists the properties of the class and their parameters.

 

ExpandedToggleIcon        See Also


Send feedback on this topic

© 2008 - 2024 Devart. All rights reserved.