Cause of Death: Spring Data JPA
summary
Spring Data JPA with Hibernate shows concrete failure modes and fixes: switching fetch to eager causes lazy initialization exception avoidance but creates N+1 selects (six authors -> six extra queries), modeling many‑to‑many as List triggers deletes and reinserts and can raise multiple bag fetch exception, query caching behaves differently between Hibernate 5 and 6 (shallow vs full) and often invalidates, repository @Modifying needs flushAutomatically+clearAutomatically to see DB updates, and misused cascading can cascade remove gone wrong and wipe data.
AI-written summary · about
chapters (14)
- 0:00Spring Data JPA pitfalls
- 4:04Lazy initialization exceptions
- 8:05N+1 select issue
- 10:33Solving N+1 with join fetch
- 13:05Many-to-many lists vs sets
- 16:37Multiple bag fetch exceptions
- 21:07Caching pitfalls
- 28:44Interface projections
- 39:27JPA performance tips
- 40:31Join fetch inconsistencies
- 44:13Modifying annotations
- 47:50Bidirectional relationships
- 49:36Cascading dangers
- 51:21Resources and closing
related talks
58mCause of Death: Hibernate.
16mCause of Death: Hibernate
49mPerformance oriented Spring Data JPA & Hibernate
47mThere is always a choice. Spring Data JDBC vs. Hibernate. Taras Boychuk. Java Fest 2020 Online
42mJPA - Beyond copy-paste
45mLazy Versus Eager Loading Strategies for JPA 2.1
44mPerformance oriented Spring Data JPA & Hibernate
48mORM Iinsights - How to Not Hurt Yourself?
