def afterInsert = {
        ADomainClass domainObject = new ADomainClass()
        domainObject.save() // <------------- THIS LINE FAILS
    }
When I modified the code slightly, then it worked as follows:
    def afterInsert = {
        ADomainClass.withNewSession {
           ADomainClass domainObject = new ADomainClass()
           domainObject.save() //
        }
    }
Reference: http://jira.grails.org/browse/GRAILS-4851
No comments:
Post a Comment