Show/Hide Toolbars

TMS Data Modeler Documentation

Navigation: TMS Aurelius Export

General Settings Tab

Scroll Prev Top Next More

The General Settings tab contains some settings that apply for the exporting process as a whole, different from the Mapping tab that configures each class specifically. Here you will also configure some default behavior that apply to all classes.

 

datamodeler_aurelius_general_settings

 

Naming options

 

You can define the default rule for naming classes, property/fields, associations and many-valued associations. Even though you can configure the name of each specific class, property, etc. in the Mappings tab, using this global configuration allows you to apply a default naming rule for all of them so you don't need to manually name them one by one.

 

Basically you have the "Use name from" fields which specifies what will be used for the "base name". For example, for class naming, you can use the base name from Table Caption in the model, or Table Name. From the base name, the Format Mask will be applied. The "%s" in the format mask will be replaced by the base name. For example, the defualt Format Mask for class naming is "T%s" which means the class name will be the base name (usually Table Caption) prefixed with "T".

 

Additionally, some naming options allow you to:

 

Camel Case: The first character of the base name or any character followed by underling will become upper case, all the other will become lower case. For example, if the base name in model is "SOME_NAME", it will become Some_Name.

Remove underline: All underlines will be removed. "SOME_NAME" becomes "SOMENAME". If combined with camel case, it will become "SomeName"

Singularize: If the base name is in plural, it will become singular. "Customers" become "Customer", "Orders" become "Order". It also applies specified singularization rules for English language (e.g., "People" becomes "Person", etc.).

 

Dictionary

 

Data Modeler can also generate the TMS Aurelius dictionary.

 

Global Var Name: Defines the name of Delphi global variable to be used to access the dictionary.

Unit Name: Defines the unit name/file name where the dictionary will be created. If empty (default), the dictionary will be created in the same file/unit as the classes (specified in the "Unit Name" field)

Legacy Dictionary: When checked, it will generate the dictionary in old format. If unchecked (default), it will generate the new format, introduced in TMS Aurelius version 5.6.

 

Defaults

 

Defines some default behaviors when translating tables/fields into classes/properties. You can override this default behaviors individually for each class/property in the "Mappings" tab.

 

 

Field

Description

Association Fetch Mode

The default fetch mode used for associations. Default value is Lazy.

Association Cascade Definition

The default cascade definition for associations. Options are "None" (no cascade) and "All but Remove" (all cascade options like save, update, merge, except remove cascade). Default value is None.

Many-Valued Association Fetch Mode

The default fetch mode used for many-valued associations. Default is Lazy.

Map One-to-One Relationship As

Defines how 1:1 relationships will be converted by default. A 1:1 relationship can be converted as a regular association (property) or can be considered an inheritance between two classes. Default value is Association.

Ancestor Class

Specifies the name of the class to be used as base class for all entity classes generated by Data Modeler. Default value is empty, which means no ancestor (all classes will descend from TObject)

Dynamic Props Container Name

Specifies the default name for the property that will be a container for dynamic properties. If empty, then by default no property will be created in the class.

Check for Missing Sequences

Defines if Data Modeler must stop exporting (raise an error) if a sequence is not defined for a class. Options are:

If supported by database: if database supports sequences/generators, then raise an error if a sequence is not defined (default)

Always: always raise an error if a sequence is not specified

Never: ignore any sequence check

 

Options

 

Defines some other general options for exporting.

 

Field

Description

Generate Dictionary

Defines if the dictionary will be generated.

Create Descriptions

If checked, an attribute [Description] will be generated for every class and field in the source code. The content of such attribute will come from the tables and fields descriptions in Data Modeler. This attribute is not used by TMS Aurelius and is useful only for the developer if he wants to retrieve such metadata at runtime.

Register Entities

When checked, the generated unit will have an initialization section with a call to RegisterEntity for each class declared in the script:

 

initialization
  RegisterEntity(TSomeClass);
  RegisterEntity(TAnotherClass);

 

This will make sure that when using the generated unit, classes will not be removed from the final executable because they were not being used in the application.

This option is useful when using the entity classes from a TMS XData server, for example.

 

 

Don't use Nullable<T>

By default, non-required columns will be generated as properties of type Nullable<T>. Check this option if you don't want to use Nullable, but instead use the primitive type directly (string, integer, etc.)