CHAPTER 10

image

Working with Objects

This chapter discusses the states an object goes through during its life cycle. The session is responsible for managing object state in Hibernate, and the EntityManager does the same in Java Persistence. Hibernate provides a persistence mechanism that is transparent to the entities and the application; the application has to know the state of an object.

The chapter also discusses the persistence context provided by Hibernate. The persistence context manages objects and caches object states within a transaction (unit of work). You will learn how to use data filtering and interceptors.

10-1. Identifying Persistent ...

Get Hibernate Recipes: A Problem-Solution Approach, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.