[SERVER-362] find() behavior with a filter field makes no sense Created: 16/Oct/09  Updated: 12/Jul/16  Resolved: 19/Oct/09

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

Type: Bug Priority: Major - P3
Reporter: Dwight Merriman Assignee: Eliot Horowitz (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

> small.find({},

{prop1:1}

)
{
"_id" : ObjectId("4ad394773dbdf53293f6c58a"),
"prop1" : "men"
}
> small.find({},{_id:1,prop1:1})
{
"_id" : ObjectId("4ad394773dbdf53293f6c589")
}
{
"_id" : ObjectId("4ad394773dbdf53293f6c58a"),
"prop1" : "men"
}
{
"_id" : ObjectId("4ad394773dbdf53293f6c58b")
}
> small.find({},

{prop1:1,id:1}

)
{
"_id" : ObjectId("4ad394773dbdf53293f6c58a"),
"prop1" : "men"
}



 Comments   
Comment by Eliot Horowitz (Inactive) [ 19/Oct/09 ]

field selector no longer has any effect on which objects are return
so
.find( {} ,

{ asdasdasdas : 1 }

)
will return every object, with only the _id field (the _id field i returned no matter what)

Generated at Thu Feb 08 02:53:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.