Mapping CMP Fields Manually
In most cases, when you create entity beans from tables, you probably
want to map fields automatically. However, you can also build up your
mappings from scratch (e.g. when the entity beans don't have a
corresponding schema object). You may also need to map CMR fields
manually after migrating projects to 10.1.2.
To map fields manually:
-
In the Navigator, right-click orion-ejb-jar.xml and chose
Properties. (You can also right click on a CMP entity bean and choose
Edit CMP Mappings.) The OC4J EJB Deployment Descriptor dialog opens.
-
Expand the node for the entity bean you want to map and then expand
CMP Field Mappings.
-
Use the New and Delete
buttons to create and remove mappings manually.
If you migrated projects to 10.1.2 that contain CMP entity beans, you
need to fix the CMR relationships.
To fix CMR relationships after migrating to 10.1.2:
-
In the Navigator, right-click orion-ejb-jar.xml and chose
Properties. (You can also right click on a CMP entity bean and choose
Edit CMP Mappings.) The OC4J EJB Deployment Descriptor dialog opens.
-
In the navigation tree on the left of the dialog, expand a CMP Entity
bean involved in a CMR relationship and click on the
CMP Field Mappings child node.
-
On the panel in the right of the dialog, select the
Relationships tab.
-
Click the Relationship combo box and
select each relationship in turn.
When each relationship is
visited, it will be automatically updated to the
10.1.2 format.
-
Repeat steps 2 through 4 for each CMP Entity bean involved in a CMR
relationship.
Related topics
About Attribute Mappings
Mapping Existing Entity Beans to Existing Tables
Mapping Relationships to Existing Tables
Copyright © 1997, 2004, Oracle.
All rights reserved.