Beta Draft: 2012-10-11
Use a Many-to-One mapping to defines a single-valued association to another entity class that has many-to-one multiplicity.
In the JPA Structure view, select the field to map.
Right click the field and then select Map As > Many-to-One. The JPA Details view (for attributes) displays the properties for the selected.
Complete each field in the Many-to-Many Mapping area.
Complete the remaining areas in the JPA Details view (for attributes).
Eclipse adds the following annotations to the field:
@JoinTable(joinColumns=@JoinColumn(name="<JOIN_COLUMN>"), name = "<JOIN_TABLE_NAME>") @ManyToOne( targetEntity=<TARGET_ENTITY>, fetch=<FETCH_TYPE>, =<_TYPE> )
Related tasks
Related references
Related concepts