Chapter 3. Domain models and metadata
In this chapter
- Discovering the CaveatEmptor example application
- Implementing the domain model
- Object/relational mapping metadata options
The “Hello World” example in the previous chapter introduced you to Hibernate; certainly, it isn’t useful for understanding the requirements of real-world applications with complex data models. For the rest of the book, we use a much more sophisticated example application—CaveatEmptor, an online auction system—to demonstrate Hibernate and Java Persistence. (Caveat emptor means “Let the buyer beware”.)
Major new features in JPA 2
- A JPA persistence provider now integrates automatically with a Bean Validation provider. When data is stored, the provider automatically validates constraints on persistent classes.
- The Metamodel API has been added. You can obtain (unfortunately not change) the names, properties, and mapping metadata of the classes in a persistence unit.