Show/Hide Toolbars

TMS Data Modeler Documentation

When exporting to TMS Aurelius, you are presented with a dialog with several options for configuring how the classes will be generated. Clicking "Ok" will update the export options in the project and generate the source files. The "Save without generating" button allows you to update the options in the project but with no generating source code - to avoid error messages, if any. Note that you must later save the Data Modeler project to effectively save the options to project file.

 

The Mappings tab contains a list of all classes, properties, associations and many-valued associations that will be generated by Data Modeler. It allows you to fine tune your exporting, by checking each individual class/property and overriding some default values. This tab is pre-filled with default values and all tables are selected for exporting - you don't need to change any settings here if you don't need to, it will export all tables with default settings.

 

datamodeler_aurelius_mappings

 

The first list displayed at the left of Mappings tab is a list of available tables/classes that will be generated. When you select an item, the right part of the window is updated to reflect the settings for the currently selected table. By default all tables are selected (meaning all classes will be generated). You can uncheck an item to avoid that class to be generated.

 

You can right click the list of selected tables for options to select all, unselect all, and other operations in the list.

 

You can also perform a search in the list by pressing Ctrl+Shift+F. This will open a search box at the bottom of the list:

 

datamodeler_aurelius_search

 

For each selected table in the list at the left, you have the following options you can configure:

 

Field

Description

Class Name

Defines the name of class to be generated.

 

If Default is checked it will use the default naming rule for the class.

Unit Name

Specifies the name of the unit file where this class will be included. If empty (default) the class will be included in the main default unit, specified in the General Settings tab. You can then specify a different unit name here.

 

TMS Data Modeler will automatically add needed uses clause in the unit (for example, if your class uses other classes defined in other units). However, you have to pay attention to cyclical references - for example, if class A references class B and class B references A, and you put each of those classes in different units, the resulting code will not compile. TMS Data Modeler will automatically inform you that you have cyclical references, but it's up to you to solve them by filling the correct unit names in this field. By default all classes are generated in a single unit, which will never cause cyclical references errors.

 

Fields Tab

 

Lists all fields/properties that will be generated for the selected class. You can uncheck items if you don't want them to be exported. Required fields cannot be unchecked. For each selected field you can configure the following options:

 

Field

Description

Property Name

Defines the name of the property to be generated. Class field names will have the same name of the property but will be prefixed with "F".

 

If Default is checked it will use the default naming rule for properties.

Property Type

Defines the type of the property to be generated ("Integer", "Nullable<double>", etc.). The default value is automatically defined from the table column type.

 

If Default is checked it will use the default type (based on column type). If unchecked, you must type the full name you want. It can be any type name, including Nullables.

 

Associations Tab

 

Lists all properties that will be generated as associations. You can uncheck items if you don't want them to be exported. For each selected association you can configure the following options:

 

Field

Description

Association Property Name

Defines the name of property to be generated for the association.

 

If Default is checked, the default naming rule specified in General Settings tab will be used.

Fetch Mode

Specifies how the association will be fetched (lazy, eager or default). If Default is selected, it will use the value specified in the General Settings tab.

Cascade

Specifies the cascade type to be used in association. Options are "Default", "None" (no cascade) and "All but Remove" (all cascade options like save, update, merge, except remove cascade).

Map this 1:1 relationship as

Visible for identity relationships. Specifies how the 1:1 association will be exported, if as association or treat as inheritance. If Default is selected, it will use the value specified in the General Settings tab.

 

Many-Valued Associations Tab

 

Lists all properties that will be generated as many-valued associations (collections). You can check items if you want them to be exported. By default collections are unchecked. For each many-valued association that can be generated you can configure the following options:

 

Field

Description

List Property Name

Defines the name of collection property to be generated for the many-valued association.

 

If Default is checked, the default naming rule specified in General Settings tab will be used.

Fetch Mode

Specifies how the association will be fetched (lazy, eager or default). If default is specified, it will use the value specified in the General Settings tab.

 

Advanced Tab

 

Lists several other settings for the table/class being exported.

 

Field

Description

Sequence/Generator for ID

Specifies the name of the sequence to be generated as the Sequence attribute (Sequence['Sequence_Name']). Not specifying a value here might cause Data Modeler to raise an error when exporting, depending on the value of "Check for missing sequences" option in General Settings tab. If you don't want to specify a sequence and also don't want any error to be raised regardless of "Check for Missing Sequences" option, choose "(none)".

Dynamic Props Container Name

Specifies the name for the property that will be a container for dynamic properties. If empty, then by default no dynamic property container will be created in the class. If Default is checked, it will use the default name specified in the "Defaults" section in main tab.

Models (Comma Separated)

The Aurelius models where this class will belong to. This relates to multimodel design in Aurelius. For each model specified here, an attribute

 

[Model('ModelName')] 

 

will be added to the class. If you want to specify more than one model, just separate the model names with commas. For example, "Default,Finance,Sales" will generate the following attributes:

 

[Model('Default')] 
[Model('Finance')]
[Model('Sales')]

 

You can have this field to be automatically filled by right clicking the list of classes at the left and choosing "Model Names" menu option.

 

datamodele_aurelius_model_names

 

You will have the following options:

 

Update From Diagrams: For each diagram containing the specified class, a model will be added with the same name of the diagram.

Update From Diagrams (include Default): Same as "Update from Diagrams", but "Default" model will also be added.

Clear All: Remove the models from all classes.

 

Note that the operations above will be performed for all tables checked in the list, not for the currently selected only.