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

javascript - Feed FileReader from server side files -

How to Change swipe Tab Title color in java Android -

Using globs in Perl replace one liner in TCL script -