I can’t find a way to intercept an event when a record is loaded from DB and a model object (usually CActiveRecord descendant) is filled in with appropriate data – something that is simmetrical to onAfterSave. The documentation lists the following events: onAfterConstruct, onAfterDelete, onAfterFind, onAfterSave,
onAfterValidate, onBeforeDelete, onBeforeFind, onBeforeSave, onBeforeValidate, onUnsafeAttribute.
The only thing which could possibly be related is onAfterConstruct, so I implemented the event handler in my model class derived from CActiveRecord, but it does not get called.
UPDATE:
In addition to the accepted answer, I have found that there is a protected method instantiate, which is intended for very same purposes. It can be overridden to access attributes of new instance. Most important that it is called after any instantiation of the record, not only after find, so it seems to be more reliable.
I think what you are looking for is
onAfterFind(), onAfterFind() raised after the record is instantiated, vsonAfterConstruct()which is raised after the model instance is created by new operator