ORM setup help?!
Hi there
I've followed the basic example to setup ORM on the CF9 sites but I always get an error: ORM is not configured for the current application.
What am I missing?
Here is my DB table (table is named ip_bw_list) structure;
[id] [int] IDENTITY(1,1) NOT NULL,
[ip_address] [nvarchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[email] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[status] [int] NOT NULL
This is my application.cfc code
<cfcomponent output="false">
<cfset this.datasource = "EDO-CRM"/>
<cfset this.ormEnabled = true />
<cffunction name="onRequestStart" returntype="boolean" output="true">
<!---data source --->
<cfset REQUEST.dsn = "edo-crm">
<!--- set application root folder. Get this directory --->
<cfset var thisDirectory = ExpandPath("./")>
<!--- Strip out this folder name --->
<cfset REQUEST.root_path = listLast(Left(thisDirectory,Len(thisDirectory)-1),"\/")>
<!--- Set the component root folder --->
<cfset REQUEST.mcom = REQUEST.root_path & ".components.">
<cfset Request.PasswordKey = "w0qj5bh19ne437b52">
<cfreturn true>
</cffunction>
</cfcomponent>
This is my component ip_bw_list.cfc
<cfcomponent persistent="true">
<cfproperty name="id" generator="increment">
<cfproperty name="ip_address">
<cfproperty name="email" >
<cfproperty name="status">
</cfcomponent>
This is my attempt to use it (where I'm getting my failure)
<cfset blacklist = EntityLoad("ip_bw_list")>
<cfdump var = "#blacklist#"/>
By the way my datasource is definitely correct and I'm using DW 8.
Really excited about using this feature but really frustrated by the fact I'm failing at the first hurdle.
Thanks for your help.
Ian.
