Creation and generation of data types for databases and programming code

When you create a class diagram attributes set types. In order to determine for the generator of the correspondence between the types used on the class diagram and the types of databases and program code that uses the map types.

Examples of the settings of the card types available in the following articles:

the Permission of type when generating

Expansion card types possible through the use of synonym types (classes with stereotype typedef).

The map types can write, what type of target language is displayed synonym type in the diagram.

Type Appears to
Строка40 string
string System.String

Type conversion during code generation as follows: if the type is not standard (for .Net framework), it is converted in accordance with lookup. After substituting all repeated again converted, if it is not standard. This is repeated until there is reduction to the standard type that is generated code. If a non-standard type cannot be converted (to substitute specified a custom type for which there is no other substitution), code generation stops with an error. In this example, it is clear that Строка40 appears in the string (predefined type), which in turn is converted to the type System.String Microsoft .Net framework.

Map types for the database

To access the map types to the database through the context menu of stages in the generator settings. The left column shows the types that you can use to the class diagram, right - corresponding database types:

If you add typedef, the map may take the following form:

Map types for program code

To access the map types for software code via the context menu of stages in the generator settings.

The map of types contains the following columns:

  • Types that you can use to the class diagram.
  • Relevant types of software code.
  • Assembly, which is a software type (used for types that are not .Net types).

If you add typedef, the map may take the following form: