I created an Article and Comment Models and Cruds. Its works perfectly. Why I need now is to have the article.title field displayed in Comment Crud instead of the comment.articleid. How can I do that?
This is where I’m stuck. I don’t know what to do next or if that’s correct:
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'article'=>array(self::BELONGS_TO, 'Article', 'articleid')
);
}
THANK YOU. Worked like a charm but I don’t understand how it worked while ‘$data->article->title’ is enclosed in single quotes which means it will not be parsed! Please clarify.