Primary business object mappings
The mappings list
All of the mappings currently established for a given data source can be viewed by right-clicking on the appropriate data source and selecting the Mappings entry from the contextual menu, which opens the Business Object Mappings window.
Each entry in the mappings list represents a set of mappings for a particular business object. Both table mappings and stored-procedure mappings are listed. It is furthermore possible to establish several different mappings for each business object, though usually you will have only one. For each entry listed here, you can read the following:
-
Business Object – This is the name of the business object to which the mapping applies.
-
Variant – If more than one mapping exists for a single business object, then each of the mappings for that object must have a unique variant name.
-
Table / Procedure – This is the name of the primary table or stored procedure in the database (as reported in the retrieved data model) to which the mapping applies.
The Business Object Mappings window includes entries for both table mappings and stored procedure mappings. These are indicated with icons as follows:
Indicates a table mapping. These mappings result in a generated SQL statement, which is submitted to the database to fetch or submit values directly from its various tables. | |
Indicates a stored procedure mappings. These mappings result in a call to a stored procedure contained in the database. Stored procedures can perform database operations that are not possible through standard SQL calls. Depending on the procedure, these may require specific input parameters and can return data sets that can be mapped to business object attributes, just as with standard table mappings. |
All mapping-related functions for your selected data source are available via contextual menus in the Business Object Mappings window. These are described in the remaining sections of this chapter.
Mappings-list view options
By default, the mappings list only includes entries for which a business object has already been mapped to a primary table or stored procedure. However, you can also set the list to include non-mapped business objects, tables and/or procedures.
To include unmapped items in the Business Object Mappings list, right-click anywhere in the list and select one of the following:
-
Show Unmapped Objects – Adds business objects for which no mapping has yet been made. This will reveal, for example, any new business objects that you have created. Note, however, that this is not the best way to add a mapping to a new business object.
-
Show Unmapped Tables – Adds tables included in the database model, but which have not yet been mapped as a primary table to any business objects. However, tables listed as "unmapped" might be actually be mapped to business object subsets via a join or relation.
-
Show Unmapped Procedures – Adds stored procedures included in the database model, but which have not yet been mapped to any business objects.
When you select one of these entries, a check mark is added to that entry in the contextual menu and the list is updated to include your selected item type. You can therefore enable all three options at once if you like. You can rehide a checked item by selecting it again in the contextual menu, thereby toggling the check off again.