Adobe COLDFUSION 9 Manual page 546

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
ColdFusion ORM
Property Name
savemapping
schema
secondarycacheenabled
skipCFCWithError
Added in ColdFusion 9.0.1
sqlscript
useDBForMapping
Sample Application.cfc
<cfset this.name = "ArtGallery">
<cfset this.ormenabled = "true">
<cfset this.ormsettings={datasource="cfartgallery", logsql="true"}>
Logging
Monitoring SQL queries that get generated and executed by ORM is critical for troubleshooting and performance
optimization.
You can monitor and log the queries by:
• Defining
in
logsql
ormsettings
in application.cfc:
<cfset this.ormsettings.logsql = "true">
This logs all the SQL queries that are generated by Hibernate to the console and server's output log file.
• Using
log4J.properties
including SQL by modifying the
Following is a sample snippet from the log4j.properties file:
Default
Description
false
Specifies whether the generated Hibernate mapping file has to be saved to
disc. If you set the value to true, the Hibernate mapping XML file is saved with
the filename "CFC name".hbmxml in the same directory as the CFC.
If any value of
specified in the ormsetting.
Specifies the default Schema that should be used by ORM.
false
Specifies whether secondary caching should be enabled. See
cache
false
Lets you specify if ColdFusion must skip the CFCs that have errors. If set to
true
, ColdFusion ignores the CFCs that have errors.
Path to the SQL script file that gets executed after ORM is initialized. This
applies if
or the path relative to the application.The SQL script file lets you populate the
tables before the application is accessed.
true
Specifies whether the database has to be inspected to identify the missing
information required to generate the Hibernate mapping. The database is
inspected to get the column data type, primary key and foreign key
information.
: This is a simple way to quickly enable SQL logging. The flag should be enabled
: Hibernate uses log4j for its logging and you can completely control its logging
, which is present under
log4j.properties
Last updated 8/5/2010
savemapping
is specified in CFC, it will override the value
for details.
is set to
dbcreate
dropcreate
<CF_HOME>/lib
Use secondary
. This must be the absolute file path
directory.
541

Advertisement

Table of Contents
loading

Table of Contents