JPA Essentials Workshop – Fundamental Concepts and Common Pitfalls
summary
Covers concrete JPA pitfalls and demos: maps inheritance with single-table strategy, joined and table-per-class choices using Spring Boot, H2 and Hibernate with auto-DDL; proves the persistence context as first-level cache, shows flush happening before commit or queries that depend on pending changes, and illustrates Spring transaction propagation (including requires_new propagation) via proxies. Explains lazy collections, join fetch to avoid N+1, Spring Data JPA derived queries and custom impl naming, SQL logging/P6, projection vs full-entity selects, identity vs sequence, and optimistic/pessimistic locking.
AI-written summary · about
chapters (19)
- 0:00Intro
- 0:37Who am I
- 1:12What I do
- 1:48Find me
- 1:59Inheritance
- 2:14Inheritance Example
- 3:43Subclass Data
- 11:03Single Table
- 12:15Demo
- 17:29Cash Transaction
- 17:49Persistence Context
- 20:01Update Entity
- 24:38Flashing
- 27:09When
- 33:34Transactional
- 35:12Start Transaction
- 35:34Proxy
- 41:42Kill Transaction
- 44:48Experiment
related talks
01h 05mJPA Puzzlers (+Hibernate and Spring)
42mJPA - Beyond copy-paste
46mThe State of Java Relational Persistence
46mEJB 3 2:JPA 2 1 Best Practices with Real Life Examples
49mPerformance oriented Spring Data JPA & Hibernate
44mPerformance oriented Spring Data JPA & Hibernate
47mThere is always a choice. Spring Data JDBC vs. Hibernate. Taras Boychuk. Java Fest 2020 Online
55mSpring Data JPA: Testing Antipatterns
