Details
-
Bug
-
Resolution: Duplicate
-
Minor - P4
-
None
-
None
-
None
-
ALL
Description
If I have a document
{
title : "My First Post", author: "Jane",
comments : [
,
]
}
The query:
> db.blogposts.find(
)
returns the entire comments document. If there are many elements in an array I would probably have to go through the entire array in my caller code and get the
right element. Although the index on embedded docs would find the document fast, it would be nice to have a conditional that returns only those elements of an array that are asked for. This would really avoid duplication of the search through the array in the calling client code.