public function relations() { return array( 'idAuthor' => array(self::BELONGS_TO, 'User', 'id'), ); } public function relations() { return array( 'articles' => array(self::HAS_MANY, 'Article', 'id_author'), ); } $post= Article::model()->findByPk(1); echo $post->title; echo $post->login;
Article1 table: title, content, id_author. table2 User: id, login.
where is the mistake? Property "Article.login" is not defined. how to fix?