Configure Orm - Adobe 38043740 - ColdFusion Standard - Mac Development Manual

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
ColdFusion ORM
For transactions, a new session is always created at the start of a transaction and ends at the end of a transaction. Any
previous open sessions are flushed and closed at the start of the transaction.
The Hibernate configuration is created and loaded only when the application starts. Therefore, any modifications to
the mapping in the persistent CFCs or in the Hibernate mapping files are not loaded automatically. To load these
modifications, you can either restart the application or call
To restart the application, you can stop the application using
in this application automatically starts it.

Configure ORM

The configuration for ORM is done in Application.cfc which makes this configuration application specific. For a
ColdFusion application to use ORM, the following are the mandatory settings that need to be configured:
1
Enable ORM for the application. To do this, set the
application.cfc
Provide the data source name by either setting data source property to
2
defining it in ORM configuration for the application.
Note that the data source should be configured on the server.
The ORM configuration is specified using a struct called
Application.cfc. The following table describes the settings for ORM that can be defined in Application.cfc.
Property Name
ormenabled
datasource
ormsettings
ORM settings
The following settings can be set in the
are optional. If you specify the value of any ORM setting to true or yes, then the setting is enabled, otherwise it is
disabled.
ORMReload()
ApplicationStop()
ormenabled
ormsettings
Description
Specifies whether ORM should be used for the ColdFusion application.Set the value to true to
use ORM. The default is false.
Defines the data source that should be used by ORM.
The struct that defines all the ORM settings. For details, see
struct that ColdFusion uses to configure ORM. All these settings
ormsettings
Last updated 1/20/2012
.
and the next request to any page
property to true in the THIS scope of
in the THIS scope of application or by
true
, which is defined in the THIS scope of
"ORM
settings" on page 538
538

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents