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

My app went from working fine to: Id field not defined for cfc Path.to.my.ORMCfCPag when I restarted

New Here ,
Nov 05, 2010 Nov 05, 2010

Hi everyone,

I have a CF9 ORM problem that I haven't been able to figure out and thought I'd see if you had any idea. I have seen a few postings talking about a "similar" problem but none of them correctly resolved this particular issue. I appreciate any help you can offer.

I recently created a CF9 app where I generated scripted ORM CFCs for my app using ColdFusion Builder. It worked great and my app was completely working. However, when I was adding some enhancements, I ran into an error when I restarted the CF app server. Here's the message I keep getting:

"Id field not defined for cfc Path.to.my.ORMCfCPage. Either the table should have a PK column mapped to a cfc field OR at least one field should be specified as id."

My App.cfc file only had orm enabled (no other mappings) when it was working. I've since tried specifying things like the cfc location etc. and it still hasn't helped.

// MORE DETAILS:

- When my app was working, I had moved it to 2 other servers. I had this error on both of those but not on my local copy. They all use the exact same database.

- The last change I made before the error was adding a generator="identity" field to my generated ORM beans. Once I got the message, I tried changing it back and restarting again but still got the error.

- I've also made sure all of the Adobe tags are in my web root (as suggested in a prior posting about this problem). I've search all over for a solution and nobody has a solution posted online that works so far.

Do you have any idea why this is happening?

Thanks!

Jeff

TOPICS
Database access
837
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
Guide ,
Nov 06, 2010 Nov 06, 2010

Quick thought and probably not relevant, but do you have this.ormsettings.savemapping set to true in your Application.cfc? I've fallen foul of this before - once CF has generated the hbmxml files and saved them to disk you can make all kinds of changes to your code which won't make a difference as it'll continue to read from the file versions, but only for certain properties and methods at times it seems.

Long shot I know, but I found CF ORM to be a nightmare for seemingly random caching.

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
New Here ,
Nov 08, 2010 Nov 08, 2010
LATEST

Thanks for the reply. I've tried it both ways and still get the same problem. No matter what I do I just can't get past that error, even though it's a bogus error because the fields it's complaining about are there and I've done ORReload() and CF app server restarts but still no change

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