Use the Multitable Info tab to define multiple tables for a descriptor in the TopLink Mapping editor.
To associate multiple tables with a descriptor:
Figure 4-24 Multitable Info Tab
When associating an additional table via Primary Key, additional options appear on the Multitable Info tab. Continue with "Primary Keys Match" or "Primary Keys are Named Differently" to assign the primary key.
Figure 4-25 Associating Multiple Tables via Primary Key
When associating a table via Foreign Key, additional options (shown in Figure 4-25) appear. You must choose a reference that relates the correct fields in the primary table to the primary keys in the selected table. Continue with "Tables are Related by Foreign Key in Primary Table" to assign the foreign key.
Figure 4-26 Associating Multiple Tables via Foreign Key
When associating a descriptor with multiple tables in which the primary key field names are identical, you do not have to specify any additional information. Select the tables from the list of available tables on the Multitable Info tab. The TopLink Mapping editor automatically selects the Primary Keys Have the Same Names option.
If the primary keys of the additional table(s) are the same, but they are named differently, you must specify how they relate to the primary key(s) of the default/primary table.
If the primary keys of the additional table are not the same as the primary keys of the primary table, but are instead related to a different set of fields, you must set up a foreign key relation between the tables.
Copyright © 1997, 2004, Oracle. All rights reserved.