cfmgrv3 init...3

This commit is contained in:
최준흠git config git config --helpgit config --global user.name 최준흠 2023-06-22 05:20:41 +09:00
parent ab7dd14d0e
commit a30cd4778c

View File

@ -197,10 +197,14 @@ class CommonController extends BaseController
}
protected function update_process($entity)
{
if (!$this->_model->save($entity)) {
Log::add("error", __FUNCTION__ . "에서 호출:" . $this->_model->getLastQuery());
Log::add("error", implode("\n", $this->_model->errors()));
throw new \Exception(__FUNCTION__ . " 오류 발생.\n" . var_export($this->_model->errors(), true));
if ($entity->hasChanged()) {
if (!$this->_model->save($entity)) {
Log::add("error", __FUNCTION__ . "에서 호출:" . $this->_model->getLastQuery());
Log::add("error", implode("\n", $this->_model->errors()));
throw new \Exception(__FUNCTION__ . " 오류 발생.\n" . var_export($this->_model->errors(), true));
}
} else {
throw new \Exception("새로 변경된 값이 없습니다." . var_export($this->_viewDatas['fieldDatas'], true));
}
return $entity;
}