没有合适的资源?快使用搜索试试~ 我知道了~
首页hibernate_reference_anotation 3.5.0-final pdf
hibernate_reference_anotation 3.5.0-final pdf
![](https://csdnimg.cn/release/wenkucmsfe/public/img/star.98a08eaa.png)
hibernate anotaion jpa 3.5.0-final pdf hibernate anotaion jpa 3.5.0-final pdf
资源详情
资源推荐
![](https://csdnimg.cn/release/download_crawler_static/2196631/bg1.jpg)
Hibernate Annotations
Reference Guide
3.5.0-Final
by Emmanuel Bernard
![](https://csdnimg.cn/release/download_crawler_static/2196631/bg2.jpg)
![](https://csdnimg.cn/release/download_crawler_static/2196631/bg3.jpg)
iii
Preface ............................................................................................................................. v
1. Setting up an annotations project ............................................................................... 1
1.1. Requirements ..................................................................................................... 1
1.2. Configuration ...................................................................................................... 1
1.3. Properties ........................................................................................................... 4
1.4. Logging .............................................................................................................. 4
2. Mapping Entities .......................................................................................................... 7
2.1. Intro ................................................................................................................... 7
2.2. Mapping with JPA (Java Persistence Annotations) ................................................ 7
2.2.1. Marking a POJO as persistent entity ......................................................... 7
2.2.2. Mapping simple properties ........................................................................ 9
2.2.3. Mapping identifier properties ................................................................... 15
2.2.4. Mapping inheritance ............................................................................... 24
2.2.5. Mapping entity associations/relationships ................................................. 28
2.2.6. Mapping composite primary keys and foreign keys to composite primary
keys ................................................................................................................ 43
2.2.7. Mapping secondary tables ...................................................................... 45
2.2.8. Caching entities ..................................................................................... 45
2.3. Mapping Queries .............................................................................................. 47
2.3.1. Mapping JP-QL/HQL queries .................................................................. 47
2.3.2. Mapping native queries .......................................................................... 48
2.4. Hibernate Annotation Extensions ....................................................................... 52
2.4.1. Entity ..................................................................................................... 52
2.4.2. Identifier ................................................................................................ 55
2.4.3. Property ................................................................................................. 56
2.4.4. Inheritance ............................................................................................. 60
2.4.5. Single Association related annotations ..................................................... 60
2.4.6. Collection related annotations ................................................................. 63
2.4.7. Cascade ................................................................................................ 66
2.4.8. Filters .................................................................................................... 67
2.4.9. Queries .................................................................................................. 68
2.4.10. Custom SQL for CRUD operations ........................................................ 69
2.4.11. Tuplizer ................................................................................................ 70
2.4.12. Fetch profiles ....................................................................................... 71
3. Overriding metadata through XML ............................................................................. 73
3.1. Principles .......................................................................................................... 73
3.1.1. Global level metadata ............................................................................. 73
3.1.2. Entity level metadata .............................................................................. 74
3.1.3. Property level metadata .......................................................................... 76
3.1.4. Association level metadata ..................................................................... 77
4. Additional modules .................................................................................................... 79
4.1. Bean Validation ................................................................................................ 79
4.1.1. Adding Bean Validation .......................................................................... 79
4.1.2. Configuration .......................................................................................... 79
![](https://csdnimg.cn/release/download_crawler_static/2196631/bg4.jpg)
Hibernate Annotations
iv
4.1.3. Catching violations ................................................................................. 81
4.1.4. Database schema .................................................................................. 81
4.2. Hibernate Validator 3 ........................................................................................ 82
4.2.1. Description ............................................................................................. 82
4.2.2. Integration with Hibernate Annotations ..................................................... 82
4.3. Hibernate Search .............................................................................................. 83
4.3.1. Description ............................................................................................. 83
4.3.2. Integration with Hibernate Annotations ..................................................... 83
![](https://csdnimg.cn/release/download_crawler_static/2196631/bg5.jpg)
v
Preface
Hibernate, like all other object/relational mapping tools, requires metadata that governs the
transformation of data from one representation to the other. Hibernate Annotations provides
annotation-based mapping metadata.
The JPA specification recognizes the interest and the success of the transparent object/
relational mapping paradigm. It standardizes the basic APIs and the metadata needed for any
object/relational persistence mechanism. Hibernate EntityManager implements the programming
interfaces and lifecycle rules as defined by the JPA persistence specification and together with
Hibernate Annotations offers a complete (and standalone) JPA persistence solution on top of the
mature Hibernate Core. You may use a combination of all three together, annotations without
JPA programming interfaces and lifecycle, or even pure native Hibernate Core, depending on the
business and technical needs of your project. At all time you can fall back to Hibernate native
APIs, or if required, even to native JDBC and SQL.
This release of Hibernate Annotations is based on the final release of the JPA 2 specification (aka
JSR-317 [http://jcp.org/en/jsr/detail?id=317]) and supports all its features (including the optional
ones). Hibernate specific features and extensions are also available through unstandardized,
Hibernate specific annotations.
If you are moving from previous Hibernate Annotations versions, please have a look at Java
Persistence migration guide [http://www.hibernate.org/398.html].
剩余89页未读,继续阅读
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![text/plain](https://img-home.csdnimg.cn/images/20210720083646.png)
![application/pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![application/pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://profile-avatar.csdnimg.cn/8db97e45235449af9c82edbe464c1979_wby2006.jpg!1)
寒城子
- 粉丝: 0
- 资源: 13
上传资源 快速赚钱
我的内容管理 收起
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![](https://csdnimg.cn/release/wenkucmsfe/public/img/voice.245cc511.png)
会员权益专享
最新资源
- 基于单片机的瓦斯监控系统硬件设计.doc
- 基于单片机的流量检测系统的设计_机电一体化毕业设计.doc
- 基于单片机的继电器设计.doc
- 基于单片机的湿度计设计.doc
- 基于单片机的流量控制系统设计.doc
- 基于单片机的火灾自动报警系统毕业设计.docx
- 基于单片机的铁路道口报警系统设计毕业设计.doc
- 基于单片机的铁路道口报警研究与设计.doc
- 基于单片机的流水灯设计.doc
- 基于单片机的时钟系统设计.doc
- 基于单片机的录音器的设计.doc
- 基于单片机的万能铣床设计设计.doc
- 基于单片机的简易安防声光报警器设计.doc
- 基于单片机的脉搏测量器设计.doc
- 基于单片机的家用防盗报警系统设计.doc
- 基于单片机的简易电子钟设计.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035711.png)
![](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![](https://csdnimg.cn/release/wenkucmsfe/public/img/green-success.6a4acb44.png)