How can we disable deepvalidate on global level in grails3 as in our case on saving one domain object its trying to save all internal domain objects leading to different errors like unique constraint and all.
We are using mongodb
Grails version 3.3.2
Gorm Version 6.1.9.Release
Globally disable cascadeValidate in Grails 3 or 4:
grails-app/conf/application.groovy
grails.gorm.default.mapping = {
'*'(cascadeValidate: 'none')
// Alternatively, validate nested changed objects:
// '*'(cascadeValidate: 'dirty')
}
Reference: https://gorm.grails.org/latest/hibernate/manual/
Section: 13.3. Cascade constraints validation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With