Search code examples
grailsgrails-ormpsql

Skip locked GORM objects when finding


Is there any way to exclude locked objects in a findAllBy query in Grails?

Scenario:

I have two instances of a single grails-app that share the same database. I want to be able to lock some rows so that the if one instance is updating these rows the other instance won't be able to find them.


Solution

  • No. Dynamic finders like findAllBy* do not support excluding locked objects.