Closed gui-com-pt closed 9 years ago
I'm trying to insert a document having an empty array. It's inserted as an empty object.
$m = new MongoClient('mongodb://localhost/testdbb'); $db = $m->db; $obj = array('name' => 'asd', 'emptyArray' => array()); $res = $db->test->insert($obj);
The result:
{ "name" : "asd", "emptyArray" : {}, "_id" : ObjectId("559c3be4049f20b32a9dface") }
Should'nt emptyArray be an array instead of an Object?
I had same problem and I used array(array()), but it's obviously a workaround
can you post this issue at https://github.com/mongofill/mongofill?
I'm trying to insert a document having an empty array. It's inserted as an empty object.
The result:
Should'nt emptyArray be an array instead of an Object?