Chapter 9 Working with Object-Oriented Models


Modifying the mapping of an attribute

You can modify the default mapping created for an attribute. The Attribute Mappings property sheet can be used to fine tune the mapping between an attribute in the current class and columns in data source tables.

In the "Mapped to" box, you can see the attribute expression. By default, attributes used in this expression are prefixed by their classes. You can customize the content of the Mapped To box by inserting comments manually. You can also click the Ellipsis button and use the SQL Editor to modify the default mapping syntax. To recover the default column expression click the User-defined tool.

In the Sources tab it is possible to select several columns and map them to the current attribute. To do so, you have to use the Add Sources tool to select columns from the list of columns belonging to the tables mapped to the current class. When you add columns from the Sources tab, and the column expression has not been modified by the user, the content of the Mapped To box in the General tab is updated.

Steps To modify the mapping of an attribute:

  1. In the Mapping tab, select the Attributes Mapping sub-tab to display the corresponding tab.
  2. Select an attribute in the list and click the Properties tool to display the Attribute Mappings Properties dialog box.
  3. Click the Sources sub-tab and click the Add Sources tool to select source columns from a selection dialog box and click OK.

    The columns appear in the Sources list.
  4. Click the General tab to display the corresponding tab. The selected columns appear in the "Mapped to" box.
  5. Click OK.

 


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