Use a One-to-Many Mapping to define a relationship with one-to-many multiplicity.
In the JPA Structure view, select the field to map.
Right-click the field and then select Map As > One-to-many. The JPA Details view (for attributes) displays the properties for the selected.
Complete each field in the One-to-Many Mapping area.
Complete the remaining areas in the JPA Details view (for attributes):
Eclipse adds the following annotations to the field:
@OneToMany(targetEntity=<TARGET_ENTITY>) @Column(name="<COLUMN>") @OneToMany(targetEntity=<TARGET_ENTITY>.class, =Type.<_TYPE>, fetch = FetchType.<FETCH_TYPE>, mappedBy = "<MAPPED_BY>" )@OrderBy("<ORDER_BY>") @JoinTable(name="<JOIN_TABLE_NAME>", joinColumns=@JoinColumn(name= "<JOIN_COLUMN_NAME>", referencedColumnName="<JOIN_COLUMN_REFERENCED_COLUMN>"), inverseJoinColumns=@JoinColumn(name="<INVERSE_JOIN_COLUMN_NAME>", referencedColumnName="<INVERSE_JOIN_COLUMN_REFERENCED_COLUMN>"))
Related tasks
Related references
Related concepts