I have extended Page into my ItemPage and added a few Varchar fields in the $db static. I also have added a tab to the CMS that will reach out via API to a service to set its name there. When the API call (which is a method of ItemPage) succeeds it will do a write to itself like $this->APIServiceName = $api_return; $this->write();
This all works well up to this point. Whenever changes are made to any other tab or CMS field my APIServiceName gets wiped out. Looking at the DB I see that my APIServiceName is set in ItemPage_Live, it will go missing off and on from ItemPage, but it is never set in ItemPage_versions.
I have a feeling it has to do with Versioned. Is there a new object created in Stage every time that wouldn't copy all the data over? If i am doing the write from within a ItemPage object am I not writing to the correct Stage/Live version?