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
Procedure
- Right-click the project and click Properties.
- Click Project Facets.
- Locate JPA in the Project Facets list. In the Version column, click the version and select 2.0 from the list.
- Click the Further configuration required link. The Modify Faceted Project window opens.
- Select a Platform from the list that supports the new facet version.
- Under JPA Implementation, select Library Provided by Target Runtime and then click OK.
- Click OK to close the Project Facets window.
- 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.