JPA - Beyond copy-paste
summary
Explains concrete JPA failures and fixes: persist vs merge causes an extra DB lookup because merge checks existence; column/@Table annotations do nothing unless configured; field vs property access changes mapping for the whole entity; missing mappedBy or joinColumn yields unexpected join tables; bag vs list forces full collection recreation while sets generate one delete/update; use join fetch or batch-size to avoid n+1 selects; optimistic locking needs version sent to REST clients; prefer UUIDs for equals/hashCode; use Hazelcast for clustered L2 cache.
AI-written summary · about
chapters (20)
- 0:00Intro
- 1:16About me
- 2:30Current solution
- 3:35Standard
- 5:51Fields vs gathers
- 7:24Field Axis
- 7:48Order
- 9:43Mapping
- 10:36Onetomany
- 12:09lazy loading
- 14:26collections
- 17:59hibernate performance issues
- 21:35save entities
- 25:37optimistic locking
- 28:01equals hashcode
- 29:42UID
- 31:36Cache
- 32:31Flash
- 37:24HQL Injection
- 39:34Conclusion
related talks
01h 49mJPA Essentials Workshop – Fundamental Concepts and Common Pitfalls
01h 05mJPA Puzzlers (+Hibernate and Spring)
45mLazy Versus Eager Loading Strategies for JPA 2.1
58mCause of Death: Hibernate.
44mORM Insights - How not to hurt yourself?
34mThe Complexity of JPA
52mCause of Death: Spring Data JPA
52mJava Persistence and Hibernate Tips that can boost up your application performance
