Quantcast
Channel: Spring Community Forums - Data
Viewing all articles
Browse latest Browse all 297

jpa2 and hibernate

$
0
0
hi

i would like to use spring data, jpa 2 and hibernate 4.2.3

i have in my maven file
spring-data-jpa

does i need them too?
ejb3-persistence

hibernate-jpa-2.0-api

my persistence.xml
Code:

<?xml version="1.0" encoding="UTF-8"?>

<persistence
        xmlns="http://java.sun.com/xml/ns/persistence"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm/orm_2_0.xsd"
        version="2.0">
       
        <!-- ============================= -->
        <!-- JPA PERSISTENCE UNIT          -->
        <!-- ============================= -->       
        <persistence-unit name="springDataJPA" transaction-type="RESOURCE_LOCAL" >
                <properties>
                        <!-- Autodetection des classes annotées @Entity -->
                        <property name="hibernate.archive.autodetection" value="class"/>
                </properties>
        </persistence-unit>
       
</persistence>

thanks

Viewing all articles
Browse latest Browse all 297

Trending Articles