................................................................................................................1.1. Getting started with Hibernate............................................................................................... 11.2. First persistent class.............................................................................................................. 31.3. Mapping the cat................................................................................................................... 41.4. Playing with cats.................................................................................................................. 51.5. Finally................................................................................................................................. 7
5.1.4.3. UUID Algorithm............................................................................................ 305.1.4.4. Identity Columns and Sequences...................................................................... 305.1.4.5. Assigned Identifiers........................................................................................ 305.1.5. composite-id............................................................................................................. 305.1.6. discriminator............................................................................................................. 315.1.7. version (optional)...................................................................................................... 315.1.8. timestamp (optional).................................................................................................. 325.1.9. property.................................................................................................................... 325.1.10. many-to-one............................................................................................................ 335.1.11. one-to-one............................................................................................................... 345.1.12. component, dynamic-component.............................................................................. 355.1.13. subclass.................................................................................................................. 365.1.14. joined-subclass........................................................................................................ 365.1.15. map, set, list, bag..................................................................................................... 375.1.16. import..................................................................................................................... 375.2. Hibernate Types................................................................................................................... 375.2.1. Entities and values..................................................................................................... 375.2.2. Basic value types....................................................................................................... 385.2.3. Persistent enum types................................................................................................. 395.2.4. Custom value types.................................................................................................... 395.2.5. Any type mappings.................................................................................................... 405.3. SQL quoted identifiers.......................................................................................................... 405.4. Customizing the DDL........................................................................................................... 415.5. Modular mapping files.......................................................................................................... 41
6. Collections
.....................................................................................................................................6.1. Persistent Collections........................................................................................................... 426.2. Mapping a Collection........................................................................................................... 426.3. Collections of Values and Many To Many Associations.......................................................... 446.4. One To Many Associations................................................................................................... 456.5. Lazy Initialization................................................................................................................ 466.6. Sorted Collections................................................................................................................ 476.7. Other Ways To Sort a Collection........................................................................................... 476.8. Garbage Collection............................................................................................................... 486.9. Bidirectional Associations.................................................................................................... 486.10. Ternary Associations.......................................................................................................... 496.11. Heterogeneous Associations................................................................................................ 496.12. Collection Example............................................................................................................ 496.13. <idbag>............................................................................................................................. 51
7. Components
..................................................................................................................................7.1. As Dependent Objects.......................................................................................................... 527.2. In Collections....................................................................................................................... 537.3. As a Map Index.................................................................................................................... 547.4. As Composite Identifiers...................................................................................................... 547.5. Dynamic components........................................................................................................... 55
8. Manipulating Persistent Data
........................................................................................................8.1. Creating a persistent object................................................................................................... 578.2. Loading an object................................................................................................................. 578.3. Querying............................................................................................................................. 588.3.1. Scalar queries............................................................................................................ 598.3.2. The Query interface................................................................................................... 608.3.3. Scrollable iteration.................................................................................................... 618.3.4. Filtering collections................................................................................................... 61HIBERNATE - Relational Persistence for Idiomatic JavaHibernate 2.1 iii