Creating an object to relational mapping for a class
To create an object to relational mapping for a class:
Double-click a class to display its property sheet, then click the Mapping tab.
Click the Create Mapping tool beside the Mapping list to create a mapping for the current class. If several data sources are available, you have to select one or several data sources in the selection list and click OK.
In the Class Sources sub-tab, click the Add Objects tool to select the source tables and views you want to map to the current class and click OK.
The name and code of the tables and views appear in the list.
Click the Attributes Mapping sub-tab in the Mapping tab and click the Add Mapping tool in the toolbar.
Select the attributes that will be mapped to columns in the source tables or views and click OK.
The selected columns appear in the first column of the list.
Generate mapping You can click the Generate Mapping tool to automatically create the mapping between columns and attributes with identical name or code in the data source and the current model
Click the down arrow in the "Mapped to" column to select the column in the data source table to which the selected attribute will be mapped.
You have to repeat this operation for each attribute you want to map to the data source.
Click the Criteria tab if you want to specify join criteria between the source tables or views.
Select the different queries tabs to visualize or modify the SQL statements.
Click OK.
Copyright (C) 2006. Sybase Inc. All rights reserved.