Relationship Mapping Editor: Join to Foreign Key

See Also 

When you have foreign-key relationships between database tables, you will usually want to preserve those relationships in the CMP beans mapped to those tables. The Relationship Mapping wizard lets you determine how relationships between mapped CMP beans are stored in the database. Relationships enable navigation from one bean to another, in the same way that a foreign key enables navigation from one table to another.

In this page, you relate a second bean to the join table you chose in the previous panel.

The editor will attempt to determine the most logical key column pairs between the join table and the table that the Related Bean is mapped to.

If the tables have a foreign key between them, the editor will use the foreign key as the default key column pair. If there is no foreign key, then you must create a key by choosing a pair of columns that will allow navigation from the join table to the table to which the Related Bean is mapped. The columns in each pair are expected to have the same value.

To create a compound key, use Add Pair to add additional key column pairs.

If the Finish button is disabled, you need to choose a join table and a key column pair.

See Also
Relationship Mapping Wizard
         Initial Setup
         Map to Key
         Local to Join
Mapping
Primary and Secondary Tables
Selecting a Secondary Table
Mapping Fields to Multiple Columns

Legal Notices