Creating and mapping unmapped elements

If you make changes to an EJB module by adding or changing enterprise beans, you may need to update the top-down mappings from beans to database. Or, if you have made changes to the backend or have imported database changes, you may also need to update the bottom-up mapping.

For example, if you create a new bean that has no corresponding database table, you can use the mapping editor to generate (for top-down maps) the table and mapping based on the bean. Likewise, if a new table is imported, you can generate (for bottom-up maps1) a new enterprise bean and mapping based on the table definition. When you create and map unmapped elements, the editor automatically creates default corresponding objects and maps, similar to what is done in the top-down and bottom-up mapping wizards. This action helps you avoid the need to create entirely new mappings when you make changes to beans or database tables:

  1. Open the mapping editor for the map.mapxmi that you need to update.

  2. From the menu, click one of the following options, depending on the direction of the mapping:

    • Mapping > Create and map database elements from EJB elements

    • Mapping > Create and map EJB elements from database elements

  3. The appropriate bean or database elements are created and the mapping is configured for the new elements.

 

Parent topic

Updating maps with the Mapping editor

1 Bottom-up mapping is not available