Showing Post From Hibernate

The N+1 With No Query In It: JPA Fetch Types From First Principles

An export endpoint died at thirty seconds. Not degraded, died: the platform router gave up, the browser reported a CORS failure that had nothing whatsoever to do with CORS, and the UI showed a toast saying something went wrong.

I had three hypotheses inside twenty minutes of reading code. All three were wrong.

Read more

save, saveAndFlush, and REQUIRES_NEW: The Hibernate Questions Hiding in One Spring Service Method

Last week I was reading a teammate’s PR and stopped on a method that made me realise something: I’d been using save, flush, commit, and REQUIRES_NEW correctly for years — and if a junior had asked me to explain precisely what each one does and when, my answer would have been thinner than my code. Using a tool and being able to teach it are different skills, and the gap only shows when someone asks.

Read more