4.2. Generator settings

Each generator has settings stored in the project file.

All paths specified in the settings are relative to the project file. This allows the same settings to be used for the entire team, regardless of the team members' operating system and repository location.

images/generators/generator_settings.png

Name conversion

OrmFactory can transform table and column names for passing to the generator. By default, it does not do this. This is necessary if the naming style in the database and in the code differs. This transformation affects only the ClassName and RepositoryName tags of Table element and FieldName tag of Column element. See the 4.3. Project structure section for details.

Also, OrmFactory will try to convert the repository name to plural, and the class name to singular.

images/generators/name_conversion.png

Partial generation

Partial generation is needed to limit the scope of the model that is passed to the generator. This is useful, for example, when you use several generators for different parts of the information system.

By default, the partial generation option is set to "Whole project".

images/generators/partial_generation_whole_project.png

Lower-level entities become accessible as you uncheck higher-level ones. If you uncheck "the whole project", you can select specific databases. Uncheck a database, you can select schemas, uncheck a schema - tables.

images/generators/partial_settings_extended.png

Selecting a schema or database allows you to avoid editing the generator configuration after each table addition.

Another possibility of partial generation is to use layouts as a list of tables to be passed to the generator. Simply select working layout options in the partial generation settings, after which adding tables to the layout will mean adding it to the generation process.