我们可以在没有休眠的情况下使用jpa [英] can we use jpa without hibernate

查看:102
本文介绍了我们可以在没有休眠的情况下使用jpa的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据我的理解,JPA是规范,Hibernate实现了JPA,并提供了JPA方法的附加功能。

但是我正在浏览JPA教程,使用 EntityManager 对象,我们可以对数据执行CRUD,而不使用Hibernate库! p>

所以任何人都可以请让我知道我可以单独使用JPA吗?


  1. 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

  1. 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屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆