Adding Attribute of Type element-collection

Overview

The JPA diagram editor supports collections of embeddables and primitives.

Procedure

  1. Click on the source entity or the embeddable of the Has-A relationship or press ESCAPE to cancel.

  2. Click on the target embeddable of the Has-A relationship or press ESCAPE to cancel.

    The Eclipse IDE creates and visualizes the Has-A relationship as well as the relevant embedded attribute in the entity, in which the embeddable is set.

The attribute will be mapped with @ElementCollection annotation.