Grails provides the following GORM configuration options:
grails.gorm.failOnError
- If set to true
, causes the save() method on domain classes to throw a grails.validation.ValidationException
if validation fails during a save. This option may also be assigned a list of Strings representing package names. If the value is a list of Strings then the failOnError behavior will only be applied to domain classes in those packages (including sub-packages). See the save method docs for more information.
Enable failOnError for all domain classes…
grails.gorm.failOnError=true
Enable failOnError for domain classes by package…
grails.gorm.failOnError = ['com.companyname.somepackage', 'com.companyname.someotherpackage']
grails.gorm.autoFlush
= If set to true
, causes the merge, save and delete methods to flush the session, replacing the need to do something like save(flush: true)
.