Skip to main content
Participant
April 13, 2023
Question

Coldfusion 2021 cfupdate database metadata cache

  • April 13, 2023
  • 2 replies
  • 571 views

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?

This topic has been closed for replies.

2 replies

BKBK
Community Expert
Community Expert
April 13, 2023

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

Participant
April 13, 2023

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.

 

BKBK
Community Expert
Community Expert
April 14, 2023

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).

Participating Frequently
April 13, 2023

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

Participant
April 13, 2023

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.