intermediate~4h
The Persistence Context — First-Level Cache, Dirty Checking & Flush
The single most important internal concept in Hibernate — it explains why an entity mutation persists with no explicit save call, why repeated loads return the same object, and what a flush actually does.
Learning objectives
- Explain why mutating a managed entity persists automatically, with no explicit save() call, at flush time.
- Describe what the first-level cache guarantees, and the exact scope (one persistence context) within which that guarantee holds.
- Explain the difference between a flush and a commit, and why a flushed change can still be rolled back.
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.
The Persistence Context — First-Level Cache, Dirty Checking & Flush