!--a11y-->
Editing the Relation Properties of an EJB
JAR 
Use this procedure to set or edit the relationships between two entity beans with container-managed persistence.
...
1. In your DLP project, choose the J2EE Components tab.
2. Choose an EJB JAR component that contains a bean with container-managed persistence.
3. Choose the Relation tab.
4. Specify the name of the relation in the Relation field.

If you do not specify a relation name, the default value will be used. It is formed by the names of the first and second roles, separated by a hyphen.

If you want to modify an already existing relation, select one from the Relationships list.
5. Enter a short description in the Relation Description field.
6. For both roles, you have to set:
i. A name in the Name field.

That name should be unique within an enterprise bean relation. Different relations can use one and the same name for different roles.
ii. A multiplicity type in the Multiplicity dropdown box. It could be ONE or MANY.

This field is mandatory.
iii. Select the Delete checkbox if the lifetime of one or more entity beans is dependant upon the lifetime of another entity bean within that relationship.

Set it only for an enterprise bean relationship role in which the other enterprise bean relationship role element specifies a multiplicity of ONE.
iv. Choose an entity bean from the Source dropdown box. One of the fields will be used for the relation. The listed ones are the available ones in the EJB JAR.

This is a mandatory field.
v. Select a field from the Field dropdown box. The list contains all fields defined for that entity bean.

You must specify at least one of the fields.

The lack of a field specifies that the relationship is unidirectional and that the enterprise bean that participates in the relationship is not aware of the relationship.
7. Click the Add button. The new relationship is added in the Relationships list.
8. If you want to modify an existing relationship:
i. Select it from the Relationships list.
ii. Modify its properties.
iii. Click the Modify button. The new settings are saved.
9. If you want to remove a relationship:
i. Select it from the Relationships list.
ii. Click the Remove button. The relationship is deleted.
10. If you want to clear the fields for the first and second role, click the Clearbutton.
11. Save your changes to the project.
