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 panel, you choose a join table, then map the relationship field to a key. This is only the relationship between the table "This Bean" is mapped to and the join table. If you don't have a join table, go back to the previous panel and select Link the Mapped Tables Directly.
Choose a join table that sits between the two tables that your beans are mapped to. The Editor will attempt to determine the most logical key column pairs between the join table and the table that "This 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 "This 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 Next button is disabled, you need to pick a join table and a key column pair.