How to order by STAT type relation

How to order by STAT relation? i.e.:

Post::model()->with(‘commentCount’)->findAll(array(‘order’ => ‘commentCount ASC’));

I get column not found.


Try array(‘order’=>‘1 asc’ )

This shouldn`t help. I turned on db query logging and commentCount is indeed not included in the select list. Any comments from core Yii guys?