Navigating to Underlying Code
There are several ways to open the source code of persistence units and entities. First, you can do it same way you open the source code of any other file, as described in the section Opening and Reopening Files in the Editor. However, if you work with JPA or Hibernate modules using the Persistence tool window and ER diagram, you can use alternative ways to navigate to the source code of persistence units, session factories, entities and attributes.
To navigate to the source code of a persistence entity
- In the Persistence tool window, right-click the desired persistence entity, and choose on the context menu, or press F4. The corresponding descriptor file opens in the editor, with the section corresponding to the persistence unit in question highlighted.
To navigate to the source code of a persistence entity, do one of the following
- In the Persistence tool window, right-click the desired persistence entity node, and choose on the context menu, or press F4.
- In the ER diagram, right-click the desired persistence entity, and choose
on the context menu, or press F4.
The corresponding Java file opens in the editor, with the caret resting at the first persistence annotation.
To navigate to the source code of a field or relationship
- In the Persistence tool window, right-click the desired persistence field or relationship node, and choose
on the context menu, or press
F4.
The corresponding Java file opens in the editor, with the caret resting at the annotation of a field or relationship.