Home
Visualizing JPA entities
A UML diagram can visualize JPA entities and their relationships. Entities can be created from the diagram, or the UML diagram can be used to visualize existing entities.
Next, we create a UML class diagram from the generated JPA entities:
![]()
Right-click the RAD75JPA project and select New Æ Class Diagram.
![]()
Accept the default name (classdiagram), and click Finish.
![]()
When prompted to enable modeling capabilities, click OK.
![]()
The class diagram opens. Expand the Palette, JPA drawer (Figure | 2-5).
![]()
Figure 12-5 Class diagram with JPA Palette
![]()
Drag the Customer class into the diagram (Figure | 2-6).
![]()
Figure 12-6 Customer class visualized
![]()
Drag the Account and Transaction classes into the diagram. Close the method compartments. Select and drag the <<use>> arrows to separate them (Figure | 2-7). Save and close the diagram.
![]()
Figure 12-7 JPA class diagram
ibm.com/redbooks