Hi community,
I recently upgraded my project from Spring Boot 2.5.x (Hibernate 5.x) to Spring Boot 3.5.x, which uses Hibernate 6.6.29.Final, and I’m now encountering the following error during update operations:
org.hibernate.StaleStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.MERGE, orphanRemoval = true, mappedBy = "parent")
@Where(clause = "IS_DELETED = 0 OR IS_DELETED IS NULL")
private List<KpiKpiGraphRelationship> kpiKpiChildRelationship = new ArrayList<>();