Skip to content

Instantly share code, notes, and snippets.

@cameroncf
Created January 10, 2018 13:11
Show Gist options
  • Select an option

  • Save cameroncf/e80af7c8cbe91d9751a4d92179ab518d to your computer and use it in GitHub Desktop.

Select an option

Save cameroncf/e80af7c8cbe91d9751a4d92179ab518d to your computer and use it in GitHub Desktop.
<cfscript>
this.ormenabled = true; // turnm ORM on or this application
this.ormsettings.dbcreate = 'update'; // valid settings: none | update | dropcreate
//this.ormsettings.eventhandling = true; // activate event handing
//this.ormsettings.eventhandler = "appname.model.EventHandler";
this.ormsettings.flushatrequestend = false; // we are going to manually commit all transactions
this.ormsettings.automanagesession = false; // we are going to manually commit all transactions
this.ormsettings.secondarycacheenabled = true;
this.ormsettings.cacheprovider = 'EhCache';
this.ormsettings.cfclocation = ['/appname/model/beans']; // CFC location (s)
this.ormsettings.logSQL = false; // log generated sql to terminal or file for review
this.ormsettings.datasource = 'primaryDSN'; // default DB for ORM
this.ormsettings.dialect = 'MySQL'; // set in environments to support alternate databases
this.ormsettings.useDBForMapping = false; // false = do not walk the db on startup trying to create ORM definitions (false=faster startup)
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment