Relational Active Record object... with a combined column variable?

Ok, let’s see if I can explain this correctly…

I have a CActiveRecord that has a relation to another table/class.

I’m able to use the nifty Yii features to access the related class’ properties just fine.

But the related class is based on a user table that has a column for First name and Last name.

I’d like the User class to have a “Name” property that can be used in the same fashion as the column names…

So I can access it by "createdBy.name" and have the proper labels and what not showing up in various places…

I hope this is clear enough!

Add this to the User class:




public function getName()

{

    return $this->FirstName." ".$this->LastName;

}

Oh geeze. That was easy. I feel lame. :)

Thanks!