search on join doesnt work

i want to search username which is stored in user model,so i wrote as follows

in model,

class CallRecord extends CActiveRecord


public $search_user;

public function relations()


	return array(




public function search()


	$criteria=new CDbCriteria;

	$criteria->with = array('user');






in view

<?php $this->widget('zii.widgets.grid.CGridView', array(











)); ?>

but,it doesnt work,what do i lost?

Try to add

$criteria->toghether= true;

3Q,i just found i have lost the rule defining,and i add attribute ‘search_user’ in search array and it works,3Q as well