据我们记载,我们可以像这样使用获得悲观锁:
def airport = Airport.get(10, [lock:true)
airport.lock() // lock for update
airport.name = "Heathrow"
airport.save()
我尝试用getAll来思考,但它没有工作
def airport = Airport.getAll(idsList, [lock:true])
错误:
getAll() is applicable for argument types: (java.util.ArrayList, java.util.LinkedHashMap)...
是否有其他方法可以获得列表的悲观锁定?
由于