Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
None
-
windows server 2008 r2 + mongodb-win32-x86_64-2.4.5
*Location*: http://docs.mongodb.org/manual/
*User-Agent*: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C; .NET4.0E)
*Referrer*: http://www.mongodb.org/user-groups
*Screen Resolution*: 1600 x 900
*repo*: docs
*source*: index
windows server 2008 r2 + mongodb-win32-x86_64-2.4.5 *Location*: http://docs.mongodb.org/manual/ *User-Agent*: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET4.0C; .NET4.0E) *Referrer*: http://www.mongodb.org/user-groups *Screen Resolution*: 1600 x 900 *repo*: docs *source*: index
Description
First, I have test this on db "test" with auth login, I have create a collection "entities" and then insert a record like this "var single = { "id" : 123, "person" : [
{ "birthday" : "12/3/2013" } ] };".
And then I can't use below command to find this record: "var record = db.entities.findOne(
);", why? Instead, I can use another command to show record: "var record = db.entities.findOne(
{"person.birthday": "12/3/2013"});". I think the value of person should be an array, so I can use person[0], but it seems like does not work.
Interestingly,I can use "record.person[0].birthday" to get value of birthday, but command "record.person.birthday" get nothing.
Please give me some reply ASAP. Thanks in advance!!!
Reporter: Kevin Zhang
E-mail: zxz414644665@163.com![]()