Changing a JPA 1.0 project to JPA 2.0

You can change a JPA 1.0 faceted project to JPA 2.0

About this task

Complete the following steps to migrate a faceted project from JPA 1.0 to JPA 2.0.

Procedure

  1. Right-click the project and click Properties.
  2. Click Project Facets.
  3. Locate JPA in the Project Facets list. In the Version column, click the version and select 2.0 from the list.
  4. Click the Further configuration required link near the bottom of the dialog. The Modify Faceted Project window opens.
  5. Under Platform, select RAD JPA 2.0 Platform from the list.
  6. Under JPA Implementation, select Library Provided by Target Runtime and then click OK.
  7. Click OK to close the Project Facets window.
  8. In the Enterprise Explorer view or another similar view, locate the persistence.xml file. Right-click the file and click Upgrade document version. The persistence.xml file is upgraded to version 2.0. Confirm the upgrade by opening the file in the Persistence XML editor and check that the version is 2.0.

Feedback