-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Native Query with clause and delete broken in spring-data-jpa 3.4.x #3817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
for: external-project
For an external project and not something we can fix
Comments
The full exception is:
|
As you can see, the exception is rooted in H2. Downgrading H2 to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In springboot 3.3.9 (using spring-data-jpa 3.3.9 and hibernate 6.5.3), a with clause supports delete operations - e.g.
In springboot 3.4.3 (using spring-data-jpa 3.4.3 and hibernate 6.6.8), this same query generates the following error
The attached sample project shows the issue - just change the springboot version in the pom
In my real world scenario I use this form of query in a loop where I also add an order by and limit clause so I do not overload my DB trying to delete 1000s of rows in a single transaction.
The springboot team also overrode my sample to use Hibernate 6.5.3, and it still failed, so the error appears to be in spring-data-jpa - ref spring-projects/spring-boot#44744
with-clause.zip
The text was updated successfully, but these errors were encountered: