简体   繁体   中英

How can a JPA 1.0 project be converted to JPA 2.0?

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?

您可能比阅读OpenJPA中的迁移指南更糟糕,然后提出更具体的问题。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM