Use this dialog box to set up a relation between two entities of a persistence unit according to the relation between the corresponding tables of the selected database.
|Source / Target||Use these sections to define the source and target parts of a relationship.|
|Attribute name||Specify the names of the fields that will be created in the source and target entities respectively.|
|Type||Specify the relationship type by selecting appropriate options from the drop-down lists in the Source and Target sections. The list contains Java types, thus enabling you to define the Java code that will be generated for the relationship.|
|Map Key Column||Select the desired column name from the drop-down list.|
|Join Table||If this check box is selected, the data will be queried from both tables on the basis of the
relationship. Select the desired join table from the list of tables available in the data
For the many-to-many relationships, this check box is selected by default, and not editable.
|Join Columns||Depending on the type of relationship, this table features the following columns:
Use the Add and Remove buttons to manage the list of join columns.