abstract from collection and yii's mongo client adapter