更新时间:2023-12-04 12:08:58
Make sure you are passing the PK to the $this->Model->save() or it will create a new ID for the PK field. Also, the $this->data should be sent to the save as $this->data with the name of the model included. So if your model name is Test, try sending it like:
$this->Test->save($this->data)
NOT
$this->Test->save($this->data['Test'])