Skip to content
Advertisement

Not supported for DML operations with JPA update query

This has been asked once before but the solution did not solve the issue. I am creating a JUnit test:

JavaScript

The query the above test is calling is:

JavaScript

Error:

JavaScript

Advertisement

Answer

The @Modifying annotation must be placed on the updateMaterialInventory method, along to the @Query annotation, to let Spring-data know that the query is not a query used to select values, but to update values.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement