JBoss Enterprise Web Platform 5
for use with JBoss Enterprise Web Platform 5
Edition 5.1.1
Legal Notice
Copyright © 2011 Red Hat, Inc.
This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack Logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
June, 2011
Abstract
The Hibernate Core Reference Guide for JBoss Enterprise Web Platform 5 and its patch releases.
- Preface
- 1. Introduction
- 2. Tutorial
- 3. Architecture
- 4. Configuration
- 5. Persistent Classes
- 6. Basic O/R Mapping
- 6.1. Mapping declaration
- 6.1.1. Doctype
- 6.1.2. Hibernate-mapping
- 6.1.3. Class
- 6.1.4. id
- 6.1.5. Enhanced identifier generators
- 6.1.6. Identifier generator optimization
- 6.1.7. composite-id
- 6.1.8. Discriminator
- 6.1.9. Version (optional)
- 6.1.10. Timestamp (optional)
- 6.1.11. Property
- 6.1.12. Many-to-one
- 6.1.13. One-to-one
- 6.1.14. Natural-id
- 6.1.15. Component and dynamic-component
- 6.1.16. Properties
- 6.1.17. Subclass
- 6.1.18. Joined-subclass
- 6.1.19. Union-subclass
- 6.1.20. Join
- 6.1.21. Key
- 6.1.22. Column and formula elements
- 6.1.23. Import
- 6.1.24. Any
- 6.2. Hibernate types
- 6.3. Mapping a class more than once
- 6.4. SQL quoted identifiers
- 6.5. Metadata alternatives
- 6.6. Generated properties
- 6.7. Auxiliary database objects
- 7. Collection mapping
- 8. Association Mappings
- 9. Component Mapping
- 10. Inheritance mapping
- 10.1. The three strategies
- 10.1.1. Table per class hierarchy
- 10.1.2. Table per subclass
- 10.1.3. Table per subclass: using a discriminator
- 10.1.4. Mixing table per class hierarchy with table per subclass
- 10.1.5. Table per concrete class
- 10.1.6. Table per concrete class using implicit polymorphism
- 10.1.7. Mixing implicit polymorphism with other inheritance mappings
- 10.2. Limitations
- 11. Working with objects
- 11.1. Hibernate object states
- 11.2. Making objects persistent
- 11.3. Loading an object
- 11.4. Querying
- 11.5. Modifying persistent objects
- 11.6. Modifying detached objects
- 11.7. Automatic state detection
- 11.8. Deleting persistent objects
- 11.9. Replicating object between two different datastores
- 11.10. Flushing the Session
- 11.11. Transitive persistence
- 11.12. Using metadata
- 12. Transactions and Concurrency
- 13. Interceptors and events
- 14. Batch processing
- 15. HQL: The Hibernate Query Language
- 15.1. Case Sensitivity
- 15.2. The from clause
- 15.3. Associations and joins
- 15.4. Forms of join syntax
- 15.5. Referring to identifier property
- 15.6. The select clause
- 15.7. Aggregate functions
- 15.8. Polymorphic queries
- 15.9. The where clause
- 15.10. Expressions
- 15.11. The order by clause
- 15.12. The group by clause
- 15.13. Subqueries
- 15.14. HQL examples
- 15.15. Bulk update and delete
- 15.16. Tips & Tricks
- 15.17. Components
- 15.18. Row value constructor syntax
- 16. Criteria Queries
- 17. Native SQL
- 18. Filtering data
- 19. XML Mapping
- 20. Improving performance
- 21. Toolset Guide
- 22. Example: Parent/Child
- 23. Example: Weblog Application
- 24. Example: Various Mappings
- 25. Best Practices
- 26. Database Portability Considerations
- A. Revision History