StaleObjectStateException on one domain object in a list affects all remaining updates
问题 I have a Quartz job in Grails that iterates my users and do a nightly update on each user. However, if I get a StaleObjectStateException on an update of a user object, it seems every update after that gets the same StaleObjectStateException. Something like this: def users = User.list() users.each { user -> try { user.doUpdate() user.save() } catch (all) { // I end up here for every user object after a StaleObjectStateException } } How can I recover? I don't mind sporadic failures (ideally I