Showing Post From Transactions
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.
