yiisoft/yii2-mongodb — pull request #4 by Redlable47 (2014-12-22 15:08:14+00:00)
Title: Update Query.php

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 } } }`