Mapping determines how database tables and views are paired together. Default mapping is based on the name of the object. A table/view on the "left" schema can only be mapped to a table/view with the same name on the "right" schema. You can change the mapping type by choosing a "Custom" mapping and specify the objects that should be paired together, which might not necessarily have the same name.
To define custom mappings, you need to:
- Set the
<TableMappingSchema>
under<CommandLineOptions>
element toCustom
. - Specify the custom pairs of Tables/Views under the element
<TablePairs>
or<ViewPairs>
The following xml fragment defines custom mappings:
<CommandLineOptions>
<TableMappingSchema>Custom</TableMappingSchema>
</CommandLineOptions>
<TablePairs>
<Pair>
<LeftObject Name="dbo.Table_A"></LeftObject>
<RightObject Name="dbo.Table_AA"></RightObject>
</Pair>
<Pair>
<LeftObject Name="dbo.Table_B"></LeftObject>
<RightObject Name="dbo.Table_BB"></RightObject>
</Pair>
</TablePairs>
Specify the full name of the objects in the custom mappings set.