Synchronizing persistent classes in the persistence.xml file

After you create persistent classes, you can automatically add them to list of classes in their persistence unit in the persistence.xml file.

About this task

The persistence.xml file is in the META-INF directory of the JPA project.

To automatically add all persistent classes in your JPA project to the persistence.xml file:

Procedure

  1. In the Package Explorer view, right-click the persistence.xml file.
  2. Select JPA Tools > Synchronize Class List.

Results

The persistent classes in your JPA project are automatically discovered and added to the persistence unit in the persistence.xml file.
Icon that indicates the type of topic Task topic
Timestamp icon Last updated: July 17, 2017 21:58

File name: t_jpa_synchronize.html