O'Reilly logo

Hibernate Recipes: A Problem-Solution Approach by GARY MAK, SRINIVAS GURUZU

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Working with Objects

This chapter discusses the states an object goes through during its lifecycle. 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.

Identifying Persistent Object States

Problem

What are the states that an object can have in Hibernate? How does the object lifecycle work? ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required