Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

ORM is not configured this application

New Here ,
Dec 24, 2012 Dec 24, 2012

Hello my friend , im using coldfusion 9;

Firstly How can i enabled ORM ?

im have application.cfm file and i convert application.cfm file to application.cfc code is below,

Application.cfc

<cfcomponent output="false">

          <cfscript>

                    this.name = "test";

                    this.sessionManagement = "Yes";

                    this.sessionTimeout = CreateTimeSpan(0,0,20,0);

                    this.setClientCookies = "Yes";

                    this.clientmanagement="yes";

    </cfscript>

             <cffunction name="onRequestStart">

                    <cfargument name="requestname" required=true />

                    <cfscript>  

               this.ormEnabled = true;

               this.datasource="test_dsn";

               this.dbcreate="none";

               include "Application.cfm";

                return true;    

                    </cfscript>

          </cffunction>

</cfcomponent>

USER.CFC

<cfcomponent persistent="true">

    <cfproperty name="EMPLOYEE_ID" fieldtype="id" generator="native" />

    <cfproperty name="EMPLOYEE_NAME" />

    <cfproperty name="EMPLOYEE_EMAIL" length="200" />

</cfcomponent>

TEST_ORM.CFM

<cfscript>

     ORMReload();

     WriteDump( EntityLoad("user"));

</cfscript>

and

İ execute test_orm.cfm given error;

ORM is not configured this application

How can i solve this problem?

554
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 24, 2012 Dec 24, 2012
LATEST

<cfcomponent output="false">

          <cfscript>

                    this.name = "test";

                    this.sessionManagement = "Yes";

                    this.sessionTimeout = CreateTimeSpan(0,0,20,0);

                    this.setClientCookies = "Yes";

                    this.clientmanagement="yes";

                   this.ormEnabled = true;

                    this.ormsettings={datasource="test_dsn", dbcreate="none"};

       </cfscript>

           

</cfcomponent>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources