[SERVER-24666] Covered Query returns null for unset fields Created: 20/Jun/16  Updated: 14/Jul/16  Resolved: 20/Jun/16

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Gar Higgins Assignee: David Storch
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-23229 Projection incorrectly returns null v... Backlog
Operating System: ALL
Steps To Reproduce:

db.widget.save({a:1})
db.widget.find({a:1}, {b:1, _id:0})
{ }
db.widget.ensureIndex({a:1, b:1})
db.widget.find({a:1}, {b:1, _id:0})
{ "b" : null }

Participants:

 Description   

A covered query returns null instead of unset for values not present in a record. This means the result of the query can change depending on whether it's covered by an index or not.



 Comments   
Comment by David Storch [ 20/Jun/16 ]

Closing as a duplicate of SERVER-23229.

Generated at Thu Feb 08 04:07:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.