Because locationRepo does not have method "update" for updating entities. SaveAndFlush is a method for updating objects in database.

If you have any other idea for this pls leave here or write in Skype.