How to check if a @transactional method perform rollback correctly in Grails?
问题 Let's say we have a code like the following (I got the code frome here): @Transactional private def unitaryOperationUpdate { Integer roleId = params.roleSelector.toInteger() def roleInstance = Role.findById(roleId) UserRol.removeAll userInstance UserRol.create userInstance, roleInstance } If some error happened between removeAll and create, how could we check ourselves if the rollback is working properly? 来源: https://stackoverflow.com/questions/18548026/how-to-check-if-a-transactional-method