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

Coldfusion 2021 cfupdate database metadata cache

New Here ,
Apr 13, 2023 Apr 13, 2023

Copy link to clipboard

Copied

Seems there is a cache stuck somewhere that has old database fields.  For example, it keeps telling me I am missing a PK called p_id.  That is an old field that does not exist any longer the DB.

 

```Incomplete primary keys provided.

The table you are attempting to update, products requires the following primary keys ('P_ID,RECORD_ID,'). Ensure that all the primary keys are provided in the form.```

 

I can simply change the name of the table and everything works fine.

 

So Coldfusion has to have that table metadata cached but I have tried everything to clear it out and I cant find anywhere to completelty wipe out that metadata.

 

Anyone ran into this and have any suggestions?

TOPICS
Database access , Server administration

Views

297

Translate

Translate

Report

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
Explorer ,
Apr 13, 2023 Apr 13, 2023

Copy link to clipboard

Copied

In CF21 admin GUI, go to Server Settings, then "Caching" in the top menu.  Lower on the page you'll see "Clear Template Cache Now" as well as "Clear Component Cache Now" and "Clear Query Cache Now" buttons.  You could give them a try.  Also, if you've just updated/upgraded either your CF install or your java version, you may want to clear out things that CF Cached along the way. Here's a great page from Charlie Arehart that points where to look: https://www.carehart.org/blog/2014/12/11/help_I_updated_CFs_JVM_and_it_wont_start#stubs 

 

Best of luck

Votes

Translate

Translate

Report

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 ,
Apr 13, 2023 Apr 13, 2023

Copy link to clipboard

Copied

Thank you, I had tried the clear caches earlier with no improvements, same error. I looked at the post, I did not have the folder they were referencing.  I am on a Mac, so there might be a difference in setup. I am temped to just rename the database table or at least hand code the mysql query and move on, I've spent enought time trying to solve this bug for Adobe.  I apprecate you giving that sugegstion.

Votes

Translate

Translate

Report

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 ,
Apr 13, 2023 Apr 13, 2023

Copy link to clipboard

Copied

Please share the code of the query that is causing the problem. Remember to use *** to hide private or confidential data.

Votes

Translate

Translate

Report

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 ,
Apr 13, 2023 Apr 13, 2023

Copy link to clipboard

Copied

I am attaching a screenshot here. I descibed the database table, I dumped out the formfields, and show the error all in the same submission.  <cfupdate> is adding p_id to the WHERE clause for no reason that makes sense to me.  I am also talking to Adobe on it, so maybe I'll have an update soon.

 

Screenshot 2023-04-13 at 7.08.13 PM.png

Votes

Translate

Translate

Report

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 ,
Apr 14, 2023 Apr 14, 2023

Copy link to clipboard

Copied

Thanks for the additional information. It makes things clearer.

 

Open the database. Check the primary-key settings for the products table. Ensure that the table no longer has a composite primary-key (P_ID, RECORD_ID).

Votes

Translate

Translate

Report

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 ,
Apr 23, 2023 Apr 23, 2023

Copy link to clipboard

Copied

LATEST

Did my last suggestion help?

Votes

Translate

Translate

Report

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
Documentation