10.2.4 Events from GORM 3.0.10

See the light - agile, industrial strength, rapid web application development made easy

(Quick Reference) # 10.2.4 Events from GORM - Reference Documentation Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari Version: 3.0.10 ## 10.2.4 Events from GORM GORM defines a number of useful events that you can listen for. Each event is translated into a key that starts with `gorm:`. For example:

    import org.grails.datastore.mapping.engine.event.*
    ...on("gorm:preInsert") { PreInsertEvent event ->
    	println "GOT EVENT $event"
    }
These events are triggered asynchronously, and so cannot cancel or manipulate the persistence operations. If you want to do that see the section on Events & Auto Timestamping in the GORM docs | Quick Reference (hide)