$this->paginate = array('contain' => array('Stock' => array('fields' => array('id','count'));
のように、stockコントローラで同じモデルをcontainの中で指定するとエラーになる。
$this->paginate = array('fields'=>array('id','count'));のようにcontainの外でfieldsを指定する。
More than 5 years have passed since last update.
Warning (512): Model "○○" is not associated with model "○○"が出た時の対処
Last updated at Posted at 2016-09-10
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme