User Tools

Site Tools


jpa:hibernate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
jpa:hibernate [2019/01/27 20:10] odeftajpa:hibernate [2019/01/27 20:11] odefta
Line 19: Line 19:
 === Migrating from Hibernate API to JPA === === Migrating from Hibernate API to JPA ===
  
-If we have a pure Hibernate API project, we can use the existing configuration file in a new JPA project.+If we have a pure Hibernate API project, we can use the existing configuration file in a new JPA project.\\
 Add in persistence.xml the property **hibernate.ejb.cfgfile** Add in persistence.xml the property **hibernate.ejb.cfgfile**
  
 <code> <code>
-<persistence xmlns="http://java.sun.com/xml/ns/persistence"  +<persistence  
-xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" +   xmlns="http://java.sun.com/xml/ns/persistence"  
-    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" +   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-    version="1.0">+   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence  
 +   http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" 
 +   version="1.0" 
 +>
     <persistence-unit name="employee">     <persistence-unit name="employee">
         <properties>         <properties>
jpa/hibernate.txt · Last modified: 2023/07/04 19:36 by 127.0.0.1