Jump to content

Updating a field value but original value still exists in DB?


cosmicsafari
 Share

Recommended Posts

Hi all,

I'm just trying to update a custom field value for a page but I noticed in the DB that the old value is still there?

Rather than updating, it appears to create a new record for the updated value and increments the sort value.

Why is this? Is it not possible to just overwrite the value within the DB using the API?

For example:

    $pageObject->of(false);
    $pageObject->customField = "Updated Value";
    $pageObject->save();
    $pageObject->of(true);

 

I would have expected the value just to be overwritten and persisted to the field table in the database?

Obviously I am missing something or just not grasping why it works like this?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...