Attach Behavior In Config

how can i attach behavior in configuration file?

for example, i`ve got model


class Post extends CActiveRecord{

public $someProperty;

}

and behavior:


class CSomeBehavior extends CActiveRecordBehavior{

public function beforeFind(){}

}

how can i attach this behavior to given model (or, maybe, i would like to attach it to some more models) in my

protected/config/main.php

?

I’m pretty sure you can’t do this in the config. You’ll need to attach it within each relevant model class.