I have a few grails apps, that all currently running under grails 2.4.2.
In every of these apps, it seems, that the optimistic-locking feature is not working.
I have my domain classes and generated controllers. I use 2 different browsers (opera and firefox) for the tests and open the same domain-instance in both of the browsers.
In both edit-dialogs, I updated the fields to different values and save then the record in one of the browsers and afterwards in the other one.
My problem is, that I don't get a hint of the concurrent update which has taken place. (Because the version-no from the original record is passed around in the views etc.)
Do I have to do the check for the version-no by myself? I thought, that would be handled by hibernate? (optimistic locking through the version field is default in grails...)
Thanks in advance!
In your case you have to check it by yourself. You can take a look at scaffolded views for the reference. Read this answer for the details: https://stackoverflow.com/a/24051451/4769188