...
Unless there's a clear business requirement for the merge option, I think we need to take the second approach, "first commit wins". In order to pursue this approach, we do need to have a mechanism for detecting concurrent updates. Which leads to...
Detection
Hibernate does offer a facility for detecting concurrent updates be by providing a version attribute. A database column (usually integer or timestamp) can be designated as a version field - for new tables we typically use the integer type.
However, the way most of our web apps are written, this offers only narrow limited protection. Generally, when a user updates data in a web app, there are two steps:
...