-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.0.4
-
Component/s: None
-
Labels:
-
Environment:Node v4.8.2, Debian 8.
-
Empty show more show less
We have recently upgraded from node drive v2.2 to v3, and have noticed that some of our queries are behaving differently. I've looked at the breaking changes document, and can't see anything relevant.
Query:
dbCollection.findOne( { aId: a, 'pi.Id' : b }, { "pi.$" : 1 }, function(err, result) {} )
Result with v2:
{ _id: 5a9e8594c926462d20f1f14f, pi: [ { Id: 5a9e85a9f2b3052aa8fd7d37, Uid: 5a0db4b5409339cc35ff4f38 } ] }
Result with v3:
{ _id: 5a9e8594c926462d20f1f14f, aId: 5a9e8594c926462d20f1f14e, p: [ { Id: 5a9e859412e41f2d20b888a3, Tid: 000000000000000000000001}, { Id: 5a9e85a9f2b3052aa8fd7d37, Tid: 5a96ce19ca25c326f8306900}], pi: [ { Id: 5a9e859412e41f2d20b888a3, Uid: 000000000000000000000001 }, { Id: 5a9e85a9f2b3052aa8fd7d37, Uid: 5a0db4b5409339cc35ff4f38 } ], }
In the v3 result, it looks like the positional projection part of the query
{ "pi.$" : 1 }is being ignored. Am I missing something here, or is this a bug?
Thank you
- related to
-
NODE-1373 Text search query stopped working after driver 3 update
- Closed