Oracle® Application Server TopLink Mapping Workbench User's Guide
10g Release 2 (10.1.2) Part No. B15900-01 |
|
Previous |
Next |
In TopLink, it is possible to spread classes across two or more tables. In the advanced tutorial, the Employee
class is stored in multiple tables: although most information is in the EMPLOYEE
table, salary information is stored in the SALARY
table.
To map the Employee class to multiple tables:
Select the Employee
descriptor in the Navigator pane.
Click the Multi-Table Info tab in the Editor pane.
If the Multi-Table info tab is not visible, right-click the Employee
descriptor and choose Set Advanced Properties > Multi-Table Info from the pop-up menu.
In the Additional Tables pane, click Add and add the SALARY
table.
In the Associated Via pane select Primary Key and in the Primary Key Table Reference pane, select Primary Keys Have Same Names.
Description of the illustration savebtn.gif
Click Save on the toolbar or choose File > Save Project to save the project.