- 595 名前:nobodyさん mailto:sage [2009/02/06(金) 03:00:32 ID:???]
- Model::save()の際に、複製を残したいと思って、
idが空になれば新規保存されるのかな?と思って、 モデルに function beforeSave() { unset ($this->data[$this->name]['id']); return true; } と書いてみたが、UPDATEされてしまった。 かといって、 function beforeSave() { $d = $this->data; unset ($d[$this->name]['id']); $this->create(); $this->set($d); return true; } ってしたら、createdの日付が0になってしまった。 何か良い方法無い?
|

|