In my previous post on logging database changes with Logbox I wanted to show how to log database changes with interceptors in a cborm
system. This should be quite simular to the quick
example from the previous post. It just needs an extra step, you have to configure this in Application.cfc:
//configure this mapping here, your ormSetting need it
this.mappings[ "/cborm" ] = COLDBOX_APP_ROOT_PATH & "/modules/cborm";
this.ormSettings = {
// ...... (other orm settings)
// Enable event handling
eventhandling = true,
// Set the event handler to use, which will be inside our application.
eventhandler = "cborm.models.EventHandler"
};
The cborm.models.EventHandler
will act as a bridge between the coldfusion ORM event handling and the interceptor system in coldbox. Orm settings are configured in Application.cfc even before coldbox is loaded. I’ve been using this for many years in older application and it always worked like a charm. For my series of blogposts on Logbox I created up a new coldbox application, configured the ORM settings as I have done for many years, and fired up some recent Lucee version. It failed.
Recent Comments