But I think you can add such a behavior in an automatic way.
However, I claim that you can also do it in an automatic way and avoid deadlocks at the same time.
E.g., like this: https://github.com/albertz/automatic_object_locking/blob/mas...
But I think you can add such a behavior in an automatic way.