Chapter 4. Mapping persistent classes
In this chapter
- Understanding entities and value type concepts
- Mapping entity classes with identity
- Controlling entity-level mapping options
This chapter presents some fundamental mapping options and explains how to map entity classes to SQL tables. We show and discuss how you can handle database identity and primary keys, and how you can use various other metadata settings to customize how Hibernate loads and stores instances of your domain model classes. All mapping examples use JPA annotations. First, though, we define the essential distinction between entities and value types, and explain how you should approach the object/relational mapping of your domain model.
Major new feature in JPA 2
You can globally enable escaping of all names in generated SQL statements with the <delimited-identifiers> element in the persistence.xml configuration file.