Dear Hibernate Team, we need to talk.
We upgraded from Spring Boot 2.7 β 3.3.10.
Everything looked fine. Until production crashed. ![]()
The culprit?
java
repository.save(entity); // one innocent line
In Hibernate 5 β shallow merge β works fine ![]()
In Hibernate 6 β loads your ENTIRE database into heap ![]()
Our table had 10 million rows. Scheduler calling save() every 15 seconds. Heap filled up silently. Entire JVM died taking down Kafka, SQS and Tomcat with it.
The worst part?
Works perfectly on fresh database
Only crashes on production data
Impossible to catch in testing. ![]()
Dear @Hibernate team β can we get:**
-
A clear warning in docs that
save()behavior fundamentally changed in Hibernate 6 -
A migration guide specifically for large dataset scenarios
-
A configuration option to control merge cascade depth
This is silently breaking production systems everywhere after Spring Boot 3.x upgrades.
Has your team hit this? ![]()
#Java #Hibernate #SpringBoot3 #OutOfMemoryError #JPA #JavaDeveloper #OpenSource