Updatebypk Scenario

hi,

Any point, how to add scenario to updateByPk ?




RequestPhone::model()->updateByPk($_POST['objces'], array(

    'scenario' => 'end_chat',//tried this but didn't work

    'ended' => time()

));






public function afterSave()

{

    parent::afterSave();


    if ($this->scenario == 'end_chat')

    {

        //do something

    }

}



have you tried:




$request = new RequestPhone('end_chat');

$request->updateByPk(.....);



what do you mean by updateByPk ?????

please explain