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.
- In the Persistence tool window, right-click the desired persistence entity, and choose on the context menu, or press ⌘↓, F4, ⌘↓ or F4F4 or F4F3 or F3F4, F4 or F4F4, F4 or F4. The corresponding descriptor file opens in the editor, with the section corresponding to the persistence unit in question highlighted.
- In the Persistence tool window, right-click the desired persistence entity node, and choose on the context menu, or press ⌘↓, F4, ⌘↓ or F4F4 or F4F3 or F3F4, F4 or F4F4, F4 or F4.
- In the ER diagram, right-click the desired persistence entity, and choose
on the context menu, or press ⌘↓, F4, ⌘↓ or F4F4 or F4F3 or F3F4, F4 or F4F4, F4 or F4.
The corresponding Java file opens in the editor, with the caret resting at the first persistence annotation.
- In the Persistence tool window, right-click the desired persistence field or relationship node, and choose
on the context menu, or press
⌘↓, F4, ⌘↓ or F4F4 or F4F3 or F3F4, F4 or F4F4, F4 or F4.
The corresponding Java file opens in the editor, with the caret resting at the annotation of a field or relationship.