NullPointerException during JPA delete with lazy collections #30542
Labels
for: external-project
Needs a fix in external project
in: data
Issues in data modules (jdbc, orm, oxm, tx)
status: invalid
An issue that we don't feel is valid
Uh oh!
There was an error while loading. Please reload this page.
Affects: v6.0.9
Since upgrading to Spring Boot 3.1.0 from 3.0.6 we are experiencing NPEs when calling .deleteAll() on Spring Data JPA repositories, but not for each entity. I suspect it is related to entities which contain lazy collections, but could not narrow it down further yet.
It seems to only occur if the transaction calling .deleteAll has not previously modified the to-be-deleted entities. We were not able to reproduce the issue using only hibernate, but we were able to reproduce the issue using only spring-framework without spring-boot/spring-data, so it might be somehow related to spring-framework, even though the issue does not occur when downgrading hibernate to 6.1.7
Please also check out the original spring-boot issue:
spring-projects/spring-boot#35617
Sample-project:
https://github.com/wilkinsona/spring-hibernate-bug-demo/tree/master
The text was updated successfully, but these errors were encountered: