
The SAP NetWeaver Developer Studio provides a JPA diagram editor tool that allows you to create, edit, and display the application data model (entities and their relationships) in a graphical environment.
You can use only one JPA diagram per project, and you cannot visualize entities from different projects in one JPA diagram.
The following JPA diagram represents the data model of employees participating in various projects, that is, two entities with a bidirectional many-to-many relationship:

Features
The JPA diagram editor comprises the following general features:
Ability to create entities and define relationships between them.
Ability to import existing entities together with their relationships.
Full synchronization with the underlying application code, that is, whenever you apply a change to any of the objects on the diagram, the corresponding application code updates automatically, and the opposite.
Error and warning markers with informative quick info text. You can view details on the marked errors and warnings in the Problems view.
Integration with the JPA Details view and the Miniature View .
You have:
Created a project to store your entities
Enabled the Java Persistence facet on that project
For more information, see Creating JPA Projects in the Developer Studio .
(Optional) Created your JPA entities
Opened the Java EE perspective in the Developer Studio
|
Task |
Steps |
|---|---|
|
Configuring the JPA diagram editor |
|
|
Opening the JPA diagram |
|
|
Creating new entities |
In the
Entities list of the
Palette , choose
The Developer Studio creates the new entity with a predefined name and a primary key. |
|
Displaying existing entities (if any) within a project on the diagram |
|
|
Defining and removing relationships between entities |
|
|
Managing entities |
You can perform the following operations on a particular entity graphical model:
To perform the actions described above, follow the steps:
|
|
Refactoring entities and attribute types |
Caution
Using the JPA diagram editor, you can perform the following refactoring operations:
|
|
Viewing and editing entities' source code |
To view and edit the source code of a particular entity, double-click the title of the corresponding entity block on the diagram. The Developer Studio opens the entity class in the standard source code editor. When you apply changes to the source code, they are automatically synchronized with the diagram. |
|
Applying templates to entities |
The Developer Studio allows you to apply a predefined “template” (for example, a session bean CRUD facade) on entities within the diagram.
For more information about templates, see Generating Applications Based On Predefined Templates . |
|
Opening the Miniature view or the JPA Details view |
|
|
Removing all entities from the diagram |
Note
This operation removes the entities from the JPA diagram only, that is, they are not removed from the underlying application data model.
|