I have a scenario where the need is to update some db records first based on a criteria and then read those records from db. I am using CrudReposirtory and in my controller I have a service which calls a repository method using a @Query to update the records and on the next line am trying to read the same records but the records are not updated unless the I am out of that controller method.