I want to save my domain class to the database without specifying the createdUser or createdDate. I’ve created an object called AuditingInfo<
createdUser
createdDate
AuditingInfo<
agree with doelleri
just add your code :
application.domainClasses.each { org.codehaus.groovy.grails.commons.GrailsDomainClass gc -> gc.metaClass.beforeInsert = { } gc.metaClass.beforeUpdate = { } }
Into BootStrap.groovy