The object-relational mismatch, EntityManager and the persistence context as Unit of Work, the four entity states (Transient/Persistent/Detached/Removed), association mapping strategies, the N+1 problem (every fix: JOIN FETCH, @BatchSize, @EntityGraph, projections), lazy vs eager loading, LazyInitializationException root cause, and L1/L2 caching.
// Lessons
- 01soon
The Object-Relational Mismatch — Why ORM Exists
- 02soon
EntityManager and the Persistence Context — Unit of Work Pattern
- 03soon
Entity Lifecycle — Transient, Persistent, Detached and Removed
- 04soon
@OneToMany and @ManyToOne — Owning Side, mappedBy and Foreign Keys
- 05soon
@ManyToMany — Join Tables, Cascade and the Ownership Trap
- 06soon
The N+1 Problem — What It Is and How to Detect It
- 07soon
N+1 Fixes — JOIN FETCH, @BatchSize, @EntityGraph and Projections
- 08soon
Lazy vs Eager Loading — FetchType Defaults and LazyInitializationException
- 09soon
The Open Session in View Anti-Pattern
- 10soon
Hibernate L1 Cache — The Persistence Context as a Cache
- 11soon
Hibernate L2 Cache — Ehcache, Region Configuration and Invalidation
- 12soon
JPQL and Named Queries — Beyond Simple findById