The Cmp Mapping tab enables you to edit the runtime container-managed persistence properties of the EJB JAR file specific to Sun Java System Application Server.
Select the node for the enterprise bean for which you wish to define Cmp Mapping.
Choose the primary table from the list of available primary tables.
Click the Advanced Settings button to choose the schema file, define the consistency level and choose one or more secondary table(s) in the Advanced Settings dialog box.
In the Field Mappings section, you can map a field to a column by selecting the column in the drop-down list for that field.
Field - This column lists the fields to be persisted. These fields are selected in the CMP Fields and CMP Relationships of the enterprise bean. This column is always disabled. To add or remove the fields to be persistent fields, use the Enterprise JavaBeans nodes.
Mapped Column - The Mapped Column allows you to change the mappings for the persistent field. Select mapping from the drop-down list. If you select the map multiple columns option from the list, Map Field to Multiple Columns dialog box is displayed.
Type - The Type column displays the data type of the selected Mapped Column. This column is disabled.
Fetch - This column specifies the fetch group configuration for fields and mappings. A field may participate in a hierarchical or an independent fetch group.
You can map the fields on the currently selected enterprise bean by selecting Automap All. Automap All will make the most logical selections and update all the mappings including relationship fields. However, clicking Automap All will override all current mappings.
The Unmap All button will remove all mappings for the currently selected enterprise bean.
NOTE: If you are using a mapping file (sun-cmp-mappings.xml) without capturing the database meta data (a schema file), your mapping will not be shown in the Field Mappings table. However, this mapping file is still valid and deployable. You can continue to use this mapping file.
Relationship Mapping Editor Overview