Invalid identifier, cakephp 2.5 relationship -
i using cakephp 2.5, , have error message :
warning (2): ociexecute(): ora-00904: "user"."uf": invalid identifier [root\app\model\datasource\database\oracle.php, line 432]
at controller have conditions asking user uf collumn
//verify controller $paginate['conditions']['user.uf'] = $this->passedargs['verify.uf']; $paginate['contain'][] = 'user';
at model have belongsto property user relationship:
//verify model public $belongsto = array( 'user' => array( 'classname' => 'usuario', 'foreignkey' => 'user_id', ),
how can relate user model verify model?
add containable behavior model class.
$actsas = array('containable');
you can load behavior on fly:
$this->verify->behaviors->attach('containable');
Comments
Post a Comment