HibernateJpaVendorAdapter is used to integrate Spring JPA with Hibernate. For example, the following configuration works:
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="trstore" />
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaV开发者_如何学运维endorAdapter">
<property name="databasePlatform" value="${hibernate.dialect}" />
</bean>
</property>
</bean>
But as per, Spring's documentation HibernateJpaVendorAdapter has only been tested with Hibernate 3.3.
http://static.springsource.org/spring/docs/3.0.x/api/org/springframework/orm/jpa/vendor/HibernateJpaVendorAdapter.html
Does Spring plan to support this(HibernateJpaVendorAdapter ) for more recent Hibernate releases like 3.5, 3.6 4.0 etc ?
If not, are there any alternative recommendations on how to integrate Spring JPA with Hibernate ?
You can raise an issue about that in spring JIRA. I suspect the documentation hasn't been updated. The adapter is very, very simple (check the source code), and there is nothing that can go wrong. We are using it with hibernate 3.5 in production without any issues.
精彩评论