public function update($field, $value) { $this->datastore->beginTransaction(); $resolve = $this->queryResolve; $explicitRelations = $this->queryExplicitRelations; $this->queryResolve = false; $this->queryExplicitRelations = false; $before = SystemAuditTrailModel::getPreUpdateData($this, $field, $value); $this->queryResolve = $resolve; $this->queryExplicitRelations = $explicitRelations; $this->preUpdateHook($field, $value); $this->datastore->setData($this->datastore->data, $this->fields); $this->updateImplementation($field, $value); $this->postUpdateHook(); SystemAuditTrailModel::logUpdate($this, $before); $this->datastore->endTransaction(); }