Grails locking rows for update in PostgreSQL with NOWAIT

Posted by & filed under grails.

One day I needed to lock a record in grails application for update so other transactions does not mess with it while I am updating it. I started digging through the doc and found a section about locking in official documentation. It was pretty straightforward: you just need to use lock() method. So I did this: And… Read more »