yii2-ext/yii2-mongodb — pull request #1 by Redlable47 (2014-12-22 15:18:24+00:00)
Title: proection

added opportunity to use fields as array with operation like $elemMatch
collection:
`{_id:{ type:1 } stats:{ { object:1 }, { object:2 } } }`
usage:
`$this->select(['stats' => ['$elemMatch' => ['object' => 2]]]);`
`$this->andWhere([ 'stats' => ['$elemMatch' => ['object' => 2]] ]);`
response from bd:
`{_id:{ type:1 } stats:{ { object:2 } } }`