【问题标题】:When hibernate is capable of doing, Why JPA has been introduced?当hibernate有能力做的时候,为什么要引入JPA?
【发布时间】:2017-04-17 13:47:54
【问题描述】:

Hibernate 什么都能做,为什么要引入 JPA。

【问题讨论】:

标签: hibernate jpa


【解决方案1】:

JPA 只是规范,Hibernate 是一种实现,您可以在此问题What's the difference between JPA and Hibernate? 中找到更多详细信息。

如果您将 JPA 与 hibernate 一起使用,那么您可以将 hibernate 替换为任何其他替代 ORM。无需修改太多代码。

类似于List 接口,现在您可以根据需要使用列表的任何实现,例如LinkedListArrayList

【讨论】:

  • 嗨 Ali,临时评论解释 your suggested edit 在 Stack Overflow 上所有出现的“谢谢”都应该删除,而不是添加。
  • @Cœur,是的,实际上我没有添加它,它已经存在,但您看到它已添加,因为有人在我编辑之前删除了它,而我没有删除它。
猜你喜欢
  • 2011-06-30
  • 2011-05-19
  • 1970-01-01
  • 1970-01-01
  • 2012-08-31
  • 2018-07-11
  • 2016-08-10
  • 1970-01-01
  • 2019-08-13
相关资源
最近更新 更多