Relational Active record with BELONGS_TO in Yii

I have 2 tables called member and memberresume.

MemberResume references member on the key memberid.

In the memberresumemodel the relation is set like this.

‘member’ => array(self::BELONGS_TO, ‘Member’, ‘memberid’)

I am trying to create a model in this manner.


But in the model I am not able to access the attributes of member table like membername etc., though the relational query generated seems to consider the relationship.

Any idea why.

Just to make sure, you try it like this, right?


It worked. Thanks.