Skip to main content
Inspiring
March 1, 2010
Question

CF 9 ORM -- CFCLocation not working

  • March 1, 2010
  • 1 reply
  • 1915 views

Hi There,

I have just started looking at ORM in CF9 and am having a problem with the CFC location. I have tried moving the CFC I'm testing with to another directory, changed the ormsettings.cfclocation to a bunch of different things, added in a mapping in the administrator and still come up short with the CF9 error: "Mapping for component .... ".

Adobe certainly doesn't give you much information about what the format is support to be, and how it is to work.

Here is what I have:

Windows version with Apache 2.0.59

Application.cfc:

   this.ormenabled                     = true;
   this.datasource                      = "testit";
   this.ormsettings                     = { };
   this.ormsettings.cfclocation     = "/App/CFC";
   this.ormsettings.dbdialect        = "MicrosoftSQLServer";

Directory structure:

  /test/app <-- Source .CFM module

  /test/app/cfc <-- Home of all my CFC's

Test.cfm

<cfset dbData = EntityLoad("tableA1", {id=3})>

Results:

  Error: Mapping for Component tableA1 not found.

Okay, I have spent hours trying and searching the next for answers as to how to make this work.

Any help would be greatly appeaciated.

Drew Nathanson

Technical Synergy, Inc.

drew@technicalsynergy.com

This topic has been closed for replies.

1 reply

Inspiring
March 1, 2010

It shouldn't matter, but I notice the case of your code and the actual dir names in the file system doesn't match.

Bear in mind that whilst CF and the file system might not be: Java is case sensitive.

--

Adam

Inspiring
March 1, 2010

Oh, and Apache certainly is.

--

Adam

Inspiring
March 1, 2010

Thanks. However, the code that I displayed is only a sample. The directory structure is with mixed

cases and everything is correctly match.

However, what is the correctly ormsettings.cfclocation format? I have read a posting at google that its suppose to a fully qualitied path and others that its relative. In my case, neither of them work.

Thanks for all your suggestions.