Importing data from file incorrect for arrays
Miljar opened this issue · 5 comments
When importing data from a file created by the export to file functionality, something goes wrong. When a document has an array of subdocuments, then that array is incorrectly imported, causing the array to only have 1 item in it. The MongoHub GUI displays everything correctly though, so this issue isn't apparent. But when you query your collection through the shell or any other client, you can see the difference.
To reproduce it, I just have to import a document like that :
{
"_id": { "$oid" : "4FF6342BC6AC7A6C2D001331" },
"pages": [ 1, 2, 3]
}
"pages" will contain only one element in the array while using the console.
This bug is in the importer. This is the same than #28
I need to understand why the fix for 28 didn't solve this problem.. It seems there are 2 code pass to parse documents (one to edit a document, one to import documents).
[master 46fd50a] test case for #39
Fixed with 2.5.2(96)
Just checked and it's fixed indeed!