Model-to-Model Generation Mappings

You control how metaclasses from one PowerDesigner model type will be generated to metaclasses in another model type by mapping them and their attributes and collections in the Mapping Editor. Any extensions defined for the source or target metamodels are displayed and available for mapping.

Note: It is not necessary to map all metaclasses (or all their contents), but only those with which you want to work. If the PowerDesigner metamodel does not contain appropriate metaclasses, attributes, compositions, or aggregations to map against, you should save any existing mappings, close the Mapping Editor, define or attach appropriate extensions, and then reopen the Mapping Editor to map to them.
  1. Drag and drop a metaclass from the source pane on the left to a metaclass in the Target pane on the right. Any source attributes are automatically mapped to target attributes with which they share a name:

    Object Generation - Mapping Metaclasses
    Note: By default, the Mapping Editor lists the standard attributes and collections of metaclasses, which are displayed, by default, in object property sheets. To display all available properties, click the Filter Properties tool, and select Show All Properties. You can also filter the tree by using the Filter Mappings and Filter Objects tools.
  2. Drag and drop additional source attributes under the metaclass to target attributes with compatible data types to map them. Attributes are contained in a folder under the metaclass and represent individual properties such as Name, Size, DimensionalType, containing boolean, textual, numeric, or object ID values:
  3. Drag and drop source sub-object metaclasses (compositions) under the metaclass to target compositions to create mappings between them:
    Any attributes under the source sub-object metaclass are automatically mapped to target attributes with which they share a name. Map other sub-object attributes as necessary.
    Note: In certain circumstances, it may be appropriate to map a source sub-object metaclass to a target object metaclass, and so such mappings are also permitted.
  4. Drag and drop source collections (aggregations) under the metaclass to target collections to create mappings between them:
  5. [optional] Select a metaclass and enter an initialization or post-processing script to modify the objects at or after creation (see Metamodel Mapping Properties).
  6. [optional] Click the target model (root node) to display the global list of mappings in the Mappings pane at the bottom of the dialog and use the arrows at the bottom of the list to change the order in which objects are generated to ensure that dependencies are respected.
    Note: To control the order in which attributes, compositions, and aggregations are generated, select the target metaclass to display its mappings in the Mappings pane, and use the arrows at the bottom of the lists on the Attribute Mappings, Collection Mappings, and Sub-Object Mappings sub-tabs.
  7. Click Apply to save your changes.