我们可以在没有休眠的情况下使用jpa [英] can we use jpa without hibernate
问题描述
但是我正在浏览JPA教程,使用 EntityManager
对象,我们可以对数据执行CRUD,而不使用Hibernate库! p>
所以任何人都可以请让我知道我可以单独使用JPA吗?
- c $ c> EntityManager 方法,不使用Hibernate?
请提及一些有用的链接或示例。 / p>
非常感谢回应。
Thanks。
<你是对的JPA是规范。 Hibernate,EclipseLink是它的一些实现。
您必须指定持久性提供者(Hibernate,EclipseLink)才能使用JPA实现。持久性提供者具有JPA规范的实现类。
I am new to JPA.
As per my understanding, JPA is specification and Hibernate implements JPA and provide add on features along with JPA methods.
But I was going through JPA tutorials, where using EntityManager
object we can perform CRUD on data, without using Hibernate libraries!
So can anyone please let me know
- Can I use JPA alone using
EntityManager
methods, not using Hibernate?
Please mention some useful link or example.
Much appreciate response.
Thanks.
You are right JPA is specification. Hibernate,EclipseLink are couple of its implementations.
You have to specify the persistence provider(Hibernate,EclipseLink) in order to use the JPA implementation. The persistence providers have the implementaion classes for JPA specifications.
这篇关于我们可以在没有休眠的情况下使用jpa的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!