User Guide Cancel

ORMReload

 

Description

Reinitializes ORM for the application.If you make any change to the persistent metadata of the CFCs, then you might want to reload the ORM.

Returns

Returns ORM session factory instance.

Category

ORM functions

Function Syntax

ORMReload()
ORMReload()
ORMReload()

Usage

Adobe recommends that you use this function only during the time of development.

See Also

ColdFusion ORM

Example

component
{
this.name = Hash( GetCurrentTemplatePath() );
/* define the application wide datasource */
this.datasource = "cfartgallery";
/* enable hibernate support for this application */
this.ormenabled = true;
/* create a struct of ORM settings */
this.ormsettings = {};
/* turn on event handling */
this.ormsettings.eventhandling = true;
/**
* @output true
*/
public boolean function onRequestStart( targetPage )
{
/* this is to ensure that ORM is up-to-date for demo */
ORMReload();
return true;
}
}
component { this.name = Hash( GetCurrentTemplatePath() ); /* define the application wide datasource */ this.datasource = "cfartgallery"; /* enable hibernate support for this application */ this.ormenabled = true; /* create a struct of ORM settings */ this.ormsettings = {}; /* turn on event handling */ this.ormsettings.eventhandling = true; /** * @output true */ public boolean function onRequestStart( targetPage ) { /* this is to ensure that ORM is up-to-date for demo */ ORMReload(); return true; } }
component 
{ 
this.name = Hash( GetCurrentTemplatePath() ); 
/* define the application wide datasource */ 
this.datasource = "cfartgallery"; 
/* enable hibernate support for this application */ 
this.ormenabled = true; 
/* create a struct of ORM settings */ 
this.ormsettings = {}; 
/* turn on event handling */ 
this.ormsettings.eventhandling = true; 
/** 
* @output true 
*/ 
public boolean function onRequestStart( targetPage ) 
{ 
/* this is to ensure that ORM is up-to-date for demo */ 
ORMReload(); 
return true; 
} 
}

Get help faster and easier

New user?