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 - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -