-
Notifications
You must be signed in to change notification settings - Fork 156
Description
When attempting to save a simple array in the example below the wrong data is returned from the query. While it displays fine in MongoHub (in the Find tab), retrieving the data from either the console or the PHP driver returns only the first index from an array. If the resulting document contains multiple array objects, then only the first index from all arrays will be shown. This caused me a good hour or two's headache today, and resulted in me going back to the console for all my managing of data, which is a shame as MongoHub is the only native MongoDB GUI (and the PHP based ones just don't cut it).
Saving the following object to the data through the insert tab
{"parts": [1,2,3,4]}
Expected result from db.things.find()
{ "_id" : ObjectId("4f5890ff624df1578936963c"), "parts" : [ 1,2,3,4 ] }
Actual result
{ "_id" : ObjectId("4f5890ff624df1578936963c"), "parts" : [ NumberLong(4) ] }
which translates to this in php
[
"_id" => "4f5890ff624df1578936963c",
"parts" => [ 1 ]
]