关于注解-Hebernate与JPA(java persistence api)
The JPA spec. defines the JPA annotation in the javax.persistence
package. Hibernate not only implements JPA spec , but extends it to adds more features . So , hibernate creates their own annotations which just extend the JPA annotation with the Hibernate features , and put these annotation inside the package org.hibernate.annotations
If there are no Hibernate specified features added for that JPA annotation (eg @OneToMany
and @ManyToOne
) , Hibernate will not make that annotation in their org.hibernate.annotations
package and you have to use these annotation from javax.persistence
according to the JPA specification.
Normally ,people will use JPA annotations until they come across a situation that requires to use hibernate features.
javax.persistence
package.2,Hibernate作为JPA的一种实现,jpa的注解已经是hibernate的核心,hibernate只提供了一些补充,而不是两套注解。hibernate对jpa的支持够足量,在使用hibernate注解建议使用jpa。
最新文章
- Daily Scrum02 12.17
- Office2010安装错误1402问题(我安装成功了)
- Asp.net Core基于MVC框架实现PostgreSQL操作
- Python~第三方模块
- Activiti6.0 安装出错 log4j:ERROR setFile(null,true) call failed.
- HDU 3687 National Day Parade (暴力)
- struts2.1笔记01:MVC框架思想浅层理解
- c语言中的#ifndef、#def、#endif等宏是什么意思
- 浅析ArrayList,LinkedList的执行效率
- 开源Math.NET基础数学类库使用(09)相关数论函数使用
- leetcode 第41题 Trapping Rain Water
- IE6里面display:inlineblock使得块元素成行排列,没用
- 让表格table呈现边框,不用给tr、td加边框的写法
- 关于JAVA IO流的学习
- HDU2057 A + B Again
- 【深度学习系列】手写数字识别卷积神经--卷积神经网络CNN原理详解(一)
- MySQL学习(十二)
- 查看文件 ls -lh
- github使用记录
- 【linux】crontab无效解决办法