5 Mapping persistent classes
This chapter covers
- Understanding entities and value types
- 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. This is essential knowledge for structuring classes in an application, no matter whether you work with Hibernate, Spring Data JPA, or some other persistence framework that implement the JPA specification. We’ll demonstrate and analyze how you can handle database identity and primary keys, and how you can use various other metadata settings to customize how Hibernate or Spring Data JPA using Hibernate as a persistence provider will load and store instances of your domain ...
Get Java Persistence with Spring Data and Hibernate now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.