For example, ghost property [font=“Lucida Console”]number_usage[/font] did came filled at gridview, but it doesn’t come populated after a [font=“Lucida Console”]findAll()[/font].
I place the debugging echo at [font=“Lucida Console”]afterFind()[/font] discovering that if I issue a [font=“Lucida Console”]model()::findAll()[/font], [font=“Lucida Console”]$this->number_start[/font] neither [font=“Lucida Console”]$this->number_limit[/font] (which aren’t ghost properties) don’t come with values.
$checkBooks = CheckBook::model()->findAll( $criteria );
if( count( $checkBooks ) )
foreach( $checkBooks as $checkBook )
{
// Here $checkBook model has only <id> property populated
$checkBook = CheckBook::model()->findByPk( $checkBook->id );
// Now $checkBook model has all virtual properties populated
}
Now, I like to know if it is by design that [font=“Courier New”]:afterFind()[/font] isn’t called after [font=“Courier New”]:findAll()[/font].