How to debug when CakePHP Model::save() doesn't attempt an INSERT

后端 未结 8 1963
一个人的身影
一个人的身影 2021-01-03 23:22

I am having a bear of a time saving the simplest record from a model called ItemView:

if($this->save($this->data)) {
  echo \'worked\';
} else {
  echo         


        
8条回答
  •  北荒
    北荒 (楼主)
    2021-01-03 23:40

    Same problem here. I wasted 2 hours of my life.

    Solution: I forget to this:

    array('post', 'put')
    

提交回复
热议问题