If I use a:
$data = Company::model()->with('type', featured')->findBySql($sql, $params);
where the findBySql gives an empty resultset, I get a:
Fatal error: Call to a member function afterFindInternal() on a non-object in /home/web/htdocs/yii.svn/framework/db/ar/CActiveFinder.php on line 454
Probably a bug?