Creating Forward and Reverse Mappings

You primarily create mappings from one or more source models to the target model. These forward mappings define how to populate the objects of the current model with those of the data source model.

In forward mapping mode, the Source pane is on the left side of the window, the target pane is on the right side, and the right-hand arrow in the middle area is depressed:



You can also create reverse mappings, which define how to populate the objects of the source models with those of the current model. To do this, click the left-hand arrow in the middle area. What was originally the source model is renamed to the target:



When you create a mapping in this mode, PowerDesigner defines a default reverse mapping (bi-directional link) when the access type of the data source (see Creating a data source) is Read/Write or Write-only.

You can modify the default reverse mapping by switching Source and Target panes and edit the Insert, Update and Delete sub-tabs in the Mappings pane. These tabs summarize the reverse mapping for a given mapping. Mappings are always owned by the model on the right-hand side.

Depending on whether you are editing the source model mappings or the target model mappings, the following types of links display. Solid lines indicate links that can be edited in the current mode (forward or reverse), while dotted lines indicate links that cannot be edited in the current mode:

Edit...mappings

Type of link

Description

Current model



Forward mapping with potential reverse mapping (bi-directional link).



Forward mapping only.



Reverse mapping with no forward mapping defined.

Data source models



Reverse mapping with potential forward mapping (bi-directional link).



Reverse mapping only.



Forward mapping with no reverse mapping defined.

Reverse mappings can be required when, for example, data has several sources and you want to define how the data in the current model objects is inserted, updated or deleted in the data source model objects.