Grails: handling StaleObjectStateException and making executeUpdate transactional

Recently I encountered a StaleObjectStateException which said "Row was updated or deleted by another transaction." We were just updating multiple objects of the same domain inside a loop. So we used executeUpdate statement instead of method to update the records, which worked. ReserveAccount.executeUpdate("update...

by Amit Jain
Tag: GORM executeUpdate