public function search()
{
// Warning: Please modify the following code to remove attributes that
// should not be searched.
$criteria=new CDbCriteria;
if ($this->scenario === 'workset')
{
$set = $this->getWorkSet();
$criteria->addInCondition('id', $set);
}
$criteria->compare('id',$this->id);
//More compare items
return $this->relatedSearch(
$criteria,
array()
);
}