EclipseUML User Guide> Persistence  Development

Add JPA properties


This section is about how to use the JPA menu inside the Class diagram:
  1. Class
  2. Attributes

Don't forget that to activate the JPA properties on class diagram elements you need to:
  1. Activate the  Persistence JPA  Class Diagram contextual menu
Select the Class Diagram background > Persistence Development > JPA
  1. Add Entity stereotype on the UML Class or in the Java Code @Entity
Select the Class > Properties > New Stereotype > Persistence::Entity to add entity stereotype using the UML Editor
Select the Class code in the java editor and type @Entity to add Entity Stereotype using the Java Editor


1. Add  JPA Properties on a Class using the UML Editor


Click on a Class >  Add JPA Annotation




2. Add JPA Properties on an Attribute

Click on an Attribute inside the Class > Add JPA Annotation