Oracle® Application Server TopLink Mapping Workbench User's Guide
10g Release 2 (10.1.2) Part No. B15900-01 |
|
Previous |
Next |
Direct collection mappings store collections of Java objects that are not TopLink-enabled. In the advanced tutorial, the responsibilitiesList
attribute is a direct collection.
To map a direct collection:
Expand the Employee
descriptor in the Navigator pane.
Click the responsibilitiesList
attribute of the Employee
descriptor.
Description of the illustration dcmapbtn.gif
Click the Direct Collect button on the mapping toolbar.
To specify where to place the strings in the direct collection, use the Target Table and Direct Field drop-down lists to select the DESCRIP field on the RESPONS databases table.
Select the Use Indirection option and choose ValueHolder. See "Implementing Indirection in the Tutorial".
Click the Table Reference tab, and add a new table reference by clicking the New button.
Create a reference named RESPONS_EMPLOYEE
, with a source table of RESPONS
and target table of EMPLOYEE
and click OK.
In the Table Reference drop-down list, choose the RESPONS_EMPLOYEE
.
Click the Add button on the Table Reference tab to add a foreign key relationship.
Set the Source Field (foreign key) to EMP_ID
(from the RESPONS table).
Set the Target Field (primary key) to EMP_ID
(from the EMPLOYEE table).
Description of the illustration savebtn.gif
Click Save on the toolbar or choose File > Save Project to save the project.