I'm developing an application where sometimes two (or more) users will edit the same record practically at the same time. It happens that the change made by the first user will be lost without any notification to the second user.
I'm wondering what's the best approach to a problem such as this?