| Anti-pattern | Consequence |
|-------------|-------------|
| @OneToMany with CascadeType.ALL + eager fetch | N+1 queries + large joins |
| Open Session in View (OSIV) | Long-running DB transactions |
| Using wrapper types in GROUP BY | Surprising null behavior |
| Not defining equals()/hashCode() on entities | Broken collections in detached state |
| Using merge() instead of persist() | Unnecessary select before insert |
This is the heart of the High-performance Java Persistence.pdf. Hibernate is an ORM giant, but without tuning, it will crush your throughput. High-performance Java Persistence.pdf
Having the file is step one. Using it correctly is step two. Here is a learning path based on the PDF’s structure: but without tuning