EclipseUML User Guide > Persistence  Development

Create Associations between Classes



EclipseUML allows to create the following mapping associations:
  1. One to One
  2. One to Many
  3. Many to One
  4. Many to Many
The Database Mapping menu is available in the Class diagram Association top down menu Database Mapping > ....
Click on the arrow to open the top down menu.







1. One to One Mapping

Click on the association arrow in the toolbar > Database Mapping > One to One > Birectional
Then move your mouse on the first class and click.
finally move the link to the second class and click.

The annotation has been added on the getter and the UML editor has been updated.




2. One to Many Mapping

Click on the association arrow in the toolbar > Database Mapping > One to Many > Birectional
Then move your mouse on the first class and click.
finally move the link to the second class and click.

The annotation has been added on the getter and the UML editor has been updated.



3. Many to One Mapping

Click on the association arrow in the toolbar > Database Mapping > Many to One > Birectional
Then move your mouse on the first class and click.
finally move the link to the second class and click.

The annotation has been added on the getter and the UML editor has been updated.




4. Many to Many Mapping

Click on the association arrow in the toolbar > Database Mapping > Many to Many > Birectional
Then move your mouse on the first class and click.
finally move the link to the second class and click.

The annotation has been added on the getter and the UML editor has been updated.





Please note EclipseUML will only create annotation on getters.
It a different choice than  Dali using attributes, but we think this is a better way of codding.