This page of the Model Settings dialog box is intended for NHibernate model properties customization. Here you can specify Database-First settings for Entity Developer behavior management during the process of adding objects from database to model. Here you can also set default values for some properties of objects composing the model, such as e.g. Default Access. In fact, this tab is a more convenient representation of the basic model properties and Entity Developer behavior settings towards the specific model. To edit the full list of model Properties, call the model Properties docking window.
Detect Many-to-Many associations – Select this checkbox to turn on the detection of many-to-many associations in your projects. If this checkbox is not selected, a class with two one-to-many associations will be generated for an intermediate table instead of a many-to-many association.
Detect Table Per Type inheritances – Specifies that inheritances of this type should be detected automatically.
Use Database Comments – Determines whether comments for database objects, if supported by DBMS, will be used for model objects Documentation initialization and taken into account when executing model or database update operations.
Include Foreign Key Columns in the Model – Determines whether to add foreign key columns as properties to the generated model classes.
Preserve schema name in storage – If selected, preserves the name of the schema for model objects when they are added from the database.
Preserve columns details – Specifies whether full information about the column should be preserved.
Preserve columns SqlType and Default – Specifies whether only full information about the type should be preserved.
Default Namespace – Defines the default namespace to be assumed for unqualified class names.
Default Assembly – Defines the default assembly to be assumed for unqualified class names.
Default Schema – Makes it possible to define a default schema for database tables.
Default Access – Makes it possible to select a default strategy for accessing a property value. Acceptable values are Property, Field, Nosetter and None.
Default Cascade – Makes it possible to select a default cascade for associations. Acceptable values are None and SaveUpdate.
Default Precision – Defines the default maximum number of digits for database columns.
Default Scale – Defines the default number of digits to the right of the decimal point for database columns.
Default Enum Storage Mode – Determines how properties of enum types will be stored in the database by default. Acceptable values are Integer (default) and String.
Default Collection Type – Default collection type used for the Many end of associations. Acceptable values are Set and Bag.
Default Lazy – Enables or disables lazy fetching.
Auto-Import – Specifies whether we can use unqualified class names (of classes in this mapping) in the query language.
Default Unicode – Specifies whether to use the Unicode encoding for database columns by default.
Default Collection Generic – Defines the default value of the generic property used for the Many end of associations.
Default Identity Generator
Name – Makes it possible to select a default identity generator. Acceptable values are:
System.Guid as the identifier.ID (POID) value is retrieved with the INSERT query. The type of an entity can be System.Int32 or System.Int64 depending on the RDBMS sequence generator.ID (POID) is generated by the RDBMS at the INSERT query through a BEFORE INSERT trigger. In this case you can use any supported type, including custom type, with the limitation of “single-column”.System.Guid and its ToString(string format) method to generate identifiers of type string. The length of the string returned depends on the configured format.System.Guid to create a byte[] that is converted to a string.Parameters – This box is active only when the custom generator is selected and allows entering parameters for selected generator.