CakePHP 2.8.3 is not binding the model automatically.
Model :
<?php
class Item extends AppModel
{
public $name = 'Item';
public $belongsTo = array(
'Cat' => array(
'className' => 'Cat',
'foreignKey' => 'cat_id',
),
);
}
The above Model is not working.
However when I Bind Model in controller. It works fine.
$this->Item->bindModel(array(
'belongsTo' => array(
'Cat' => array(
'foreignKey' => 'cat_id',
))));
What could be the cause ?