I have a problem redefining the init method in one of my models extending CActiveRecord class
The init method does not execute when I do a find (but it executes when I do a new)
The problem: public function __construct
When I call a find method, this condition is true and return before call the init()
if($scenario===null) // internally used by populateRecord() and model()
return;
Why?
I'm redefining the scenario in the init
// init in my model
public function init()
{
if($condition))
$this->scenario='scenario1';
else
$this->scenario='scenario2';
return parent::init();
}
What can I do?

Help














