page header

Auto-mapping Unmapped Model Elements

When working model-first, the Relational Model Data follows the defined model elements. The LLBLGen Pro designer has several tools to auto-generate and auto-map model elements (entities, fields) to Relational Model elements. These tools are described more in detail below.

Auto-map unmapped entities

This feature maps all entities which don't have a mapping for a given database in the relational model data or which mapping is defined but there's no target defined to existing or new tables. If there's a potential target (view, table) found for the unmapped entity, that target is used as the target for the mapping of that entity. A potential target is a target which name, when pushed through the name construction rules for reverse engineering, results in the name of the entity and which has the same number of fields as the entity. If no potential target is found for an entity, a new target is created using the fields of the entity and the values of the Project Settings for name construction of Relational Model elements and type selection (e.g. variable length strings instead of fixed length strings)

To auto-map unmapped entities in a group, right-click the Entities node of a group in Project Explorer and select 'Auto-map unmapped Entities' from the context menu. To auto-map all unmapped entities in the entire project, select Project -> Auto-map unmapped Entities from the main menu. After the process has been completed, a log will be shown with all the changes made.

It's recommended to use the Validate and Adjust Relational Model Data validation step afterwards to make sure all constraints are propagated to the relational model as well.

Auto-map unmapped entity fields

When an entity already has a mapping to a target or targets, but some fields of the entity don't have a valid mapping you can order the designer to auto-map these fields to new or existing target fields. To do so, do one of the following:

When selecting the context menu option from Project explorer or the main menu option, a log will be shown afterwards with all the changes made.


LLBLGen Pro Designer v4.2 documentation. ©2002-2015 Solutions Design