Mapping Oracle Object Types to CMP Fields
That database table managing your CMP persistence may include columns containing
Oracle Object types. When you based fields on these columns, you may not have
had a domain available to map the object types. This procedure tells you how
to create a domain and map the object type to the domain after creating the
EJB.
To map an Oracle Object Type to a CMP field:
- When you create
the bean, base
the field on the appropriate database coulmn. Accept the default type
mapping for now.
- Create a persistence object for the bean.
- In the Navigator, right-click the persistence object.
- Choose Edit.
- Select the Attribute Settings tab.
- From the Select Attribute dropdown list, select the field that maps
to the object type.
- Open the Type dropdown list.
One of the selections will be a domain named after the object type, even if
no such domain exists.
- Select the domain.
- Click Finish.
JDeveloper will create the appropriate domain and make the EJB field of that
type.