-
Type: Task
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.2.22
-
Component/s: MongoDB 3.2
-
Environment:Node.js
-
Empty show more show less
Lets say I have the below record in the `Groups` collection:
```
```
Then if I do query like this, then it works fine:
```
db.Groups.find({
members:
})
```
But if I do query like this:
```
db.Groups.find({
members:
})
```
Then I will get this error, quite surprised:
```
{ MongoError: exception: cannot infer query fields to set, path 'members' is matched twice
at Function.MongoError.create (/app/node_modules/mongodb-core/lib/error.js:31:11)
at /app/node_modules/mongodb-core/lib/connection/pool.js:483:72
at authenticateStragglers (/app/node_modules/mongodb-core/lib/connection/pool.js:429:16)
at Connection.messageHandler (/app/node_modules/mongodb-core/lib/connection/pool.js:463:5)
at Socket.<anonymous> (/app/node_modules/mongodb-core/lib/connection/connection.js:319:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:548:20)
name: 'MongoError',
message: 'exception: cannot infer query fields to set, path \'members\' is matched twice',
errmsg: 'exception: cannot infer query fields to set, path \'members\' is matched twice',
code: 54,
ok: 0,
'$gleStats':
{ lastOpTime: Timestamp
,
electionId: 589c42b7d4fababa657fa1c2 } }
```