How do I know if a Grails model was changed since its retrieval?
问题 I want multiple users to be able to edit models in a web browser at the same time and conflicts detected when the save (so that the first user to write doesn't have their changes overwritten without the second user explicitly saying so). Here's the example: User A retrieves object X and is looking at it in their browser. Then User B retrieves object X, looks at it in their browser, modifies it, and saves it causing a post to the REST api in Grails and a save on the model to the database. Then