Question

We've been using JPA 1.0 for some time now. We want to move ahead to JPA 2.0. How can this be done?

Était-ce utile?

La solution 2

We changed the version name and xsd as the following:

<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
             version="2.0" xmlns="http://java.sun.com/xml/ns/persistence">

Which worked fine.

Please mention in comments if you think additional things need to be done and I will update this answer.

Autres conseils

You could do worse than to read the migration guide from OpenJPA and then ask a more specific question.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top