i got a question about this kind of code :
Test::model()->attachEventHandler(‘onAfterFind’,array($this,‘testingBefore’));
Test::model()->attachEventHandler(‘onAfterFind’,array($this,‘testingAfter’));
Test::model()->findAll();
i thought that this will call
testingBefore()
and
testingAfter()
but after a bit debugging i figure out that it’ll only call testingBefore() since findAll() create a new object wish does not have an event handler for onAfterFind.
my question is this a desired feature ?
if not may be you should update CActiveRecord (line:1493) with something like :
$record->afterFind();
- $this->afterFind())
or
-
$record->_e=$this->_e;
$record->afterFind();
Thanks