php - CakePHP not binding model automatically -


cakephp 2.8.3 not binding model automatically.

model :

<?php class item extends appmodel {      public $name = 'item';      public $belongsto = array(          'cat' => array(             'classname'  => 'cat',             'foreignkey' => 'cat_id',         ),      );  } 

the above model not working.

however when bind model in controller. works fine.

$this->item->bindmodel(array(             'belongsto' => array(             'cat' => array(             'foreignkey' => 'cat_id',             )))); 

what cause ?


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -