As documented we could use obtain pessimistic lock like this:
def airport = Airport.get(10, [lock:true)
airport.lock() // lock for update
airport.name = "Heathrow"
airport.save()
I tried to de the same think with getAll but it doesn't work
def airport = Airport.getAll(idsList, [lock:true])
Error:
getAll() is applicable for argument types: (java.util.ArrayList, java.util.LinkedHashMap)...
Is there another way to obtain a pessimistic lock for a list?
Thanks