I have 2 methods that update an entity and have similar functionality, but I have inherited the codebase with little testing so don’t want to do a refactor yet.
However, there is a bug in one of these methods where it updates n entities of the same type based on the filter rather than a single one.
I am getting a row updated in another transaction error but this goes away when I have a breakpoint on the repo.saveAndFlush() method. I have been googling for a few days now and not found a reason