5.1.4.5. Assigned identifiers .................................................................................... 34
5.1.4.6. Primary keys assigned by triggers ................................................................ 34
5.1.5. composite-id ......................................................................................................... 34
5.1.6. discriminator ......................................................................................................... 35
5.1.7. version (optional) .................................................................................................. 36
5.1.8. timestamp (optional) .............................................................................................. 36
5.1.9. property ................................................................................................................ 37
5.1.10. many-to-one ........................................................................................................ 38
5.1.11. one-to-one ........................................................................................................... 39
5.1.12. component, dynamic-component .......................................................................... 40
5.1.13. subclass .............................................................................................................. 41
5.1.14. joined-subclass .................................................................................................... 41
5.1.15. union-subclass ..................................................................................................... 42
5.1.16. join ..................................................................................................................... 43
5.1.17. key ..................................................................................................................... 43
5.1.18. map, set, list, bag ................................................................................................. 44
5.1.19. import ................................................................................................................. 44
5.2. Hibernate Types ............................................................................................................... 44
5.2.1. Entities and values ................................................................................................. 44
5.2.2. Basic value types ................................................................................................... 45
5.2.3. Custom value types ............................................................................................... 46
5.2.4. Any type mappings ................................................................................................ 46
5.3. SQL quoted identifiers ...................................................................................................... 47
5.4. Modular mapping files ...................................................................................................... 47
5.5. Using XDoclet markup ..................................................................................................... 48
6. Collection Mapping ................................................................................................................... 50
6.1. Persistent Collections ....................................................................................................... 50
6.2. Mapping a Collection ....................................................................................................... 51
6.3. Collections of Values and Many-To-Many Associations ..................................................... 52
6.4. One-To-Many Associations .............................................................................................. 54
6.5. Lazy Initialization ............................................................................................................ 54
6.6. Sorted Collections ............................................................................................................ 55
6.7. Using an <idbag> ............................................................................................................. 56
6.8. Bidirectional Associations ................................................................................................ 57
6.9. Ternary Associations ........................................................................................................ 58
6.10. Heterogeneous Associations ............................................................................................ 58
6.11. Collection examples ....................................................................................................... 58
7. Component Mapping ................................................................................................................ 61
7.1. Dependent objects ............................................................................................................ 61
7.2. Collections of dependent objects ....................................................................................... 62
7.3. Components as Map indices .............................................................................................. 63
7.4. Components as composite identifiers ................................................................................. 63
7.5. Dynamic components ....................................................................................................... 64
8. Inheritance Mapping ................................................................................................................. 66
8.1. The Three Strategies ......................................................................................................... 66
8.2. Limitations ...................................................................................................................... 68
9. Working with Persistent Data ................................................................................................... 70
9.1. Creating a persistent object ............................................................................................... 70
9.2. Loading an object ............................................................................................................. 70
9.3. Querying ......................................................................................................................... 71
9.3.1. Scalar queries ........................................................................................................ 72
9.3.2. The Query interface ............................................................................................... 72
HIBERNATE - Relational Persistence for Idiomatic Java
Hibernate 3.0alpha iii