I'd like to achieve pessimistic lock with GORM's where query.
Something like
def query = Person.where {
firstName == "Bart"
}
//instead of where.findAll()
List personsLocked = where.lockAll()
I know, I can achieve that by criteria API:
List personsLocked = Person.createCriteria().list {
eq('firstName', 'Bart')
lock true
}
Is there a way to achieve this via the "where" query ?