Chapter 15 The Mapping Editor


Creating a mapping using the drag and drop feature

You can create a mapping by dragging one or more object icons from the Source pane and dropping it to the Target pane.

When the drop position of a single object icon is unauthorized a barred circle is displayed.

When an object icon from a multi-selection in the Source pane has no default action for the drag and drop in the Target pane, the whole selection is rejected.

For a given mapping, the following results occur depending on the type of object you drag and where you drop it:

Source > Destination Result
Parent object > parent object Both parent objects are mapped together with their child objects if their name and code match. In the Mappings pane, the mapping is displayed in the Mapping list, the source of the parent object displays in the Sources sub-tab and the mapping of its child objects displays in the Child Object Mapping sub-tab.
Child object > child object which did not mapped because their names are different, you can "force" the mapping Both child object are mapped and this mapping is added to the list of attributes mappings in the Child Object Mapping sub-tab.
Child object owned by a different parent object > child object Both child object are mapped and this mapping is added to the list of attributes mappings in the Child Object Mapping sub-tab.
Child object or parent object > folder The child object or the parent object with its child objects are created in the appropriate folder in the target model and are mapped with their respective source objects. The child object is added to the list of attributes mappings in the Child Object mapping sub-tab. The parent object displays as a new mapping in the Mapping list together with its child objects mappings in the Child Object Mapping sub-tab.
Child object owned by a different parent object > parent object (XML specific) The parent of the child object is mapped to the target parent object and displays in the Sources sub-tab. The child object is mapped to a new created child object in the target model and is added to the list of attributes mappings in the Child Object mapping sub-tab.

XML specifics

As an XML element can correspond to a simple type containing only an elementary value (for example <Name>Bill</Name>), you can directly map an element to a class attribute, an element attribute or to a table column using the drag and drop feature.

Steps To create a mapping using the drag and drop feature:

  1. Drag one or more object icons from the Source pane and drop it onto the appropriate object icon in the Target pane.

    A link is automatically created between the objects to materialize the mapping and a small symbol is displayed on the source and the target objects icon. Besides, the mapping details display in the Mappings pane.

If a mapping is already defined for an object icon the drag and drop feature reuse the existing mapping to complement it.

 


Copyright (C) 2006. Sybase Inc. All rights reserved.