Hmm,
I must say it is a bit disappointing to see entire "virtual attribute" concept mostly misleading.
Well,
I have this inside my 'Users' model:
public $fullname;
{other code here - not really important}
public function search()
{
$sort = new CSort();
$sort->attributes = array('*', 'CONCAT(surname, ", ", forename) AS fullname');
$sort->defaultOrder = array('fullname' => CSort::SORT_ASC);
$criteria=new CDbCriteria;
$criteria->select = array('*', 'CONCAT(surname, ", ", forename) AS fullname');
$criteria->compare('id', $this->id);
$criteria->compa