Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing data from file incorrect for arrays #39

Closed
Miljar opened this issue Jul 10, 2012 · 5 comments
Closed

Importing data from file incorrect for arrays #39

Miljar opened this issue Jul 10, 2012 · 5 comments

Comments

@Miljar
Copy link

Miljar commented Jul 10, 2012

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.

@jeromelebel
Copy link
Owner

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).

@jeromelebel
Copy link
Owner

[master 46fd50a] test case for #39

@jeromelebel
Copy link
Owner

[master 3e22814] problem to convert objects into bson (array items didn't have the right index) #39

@jeromelebel
Copy link
Owner

Fixed with 2.5.2(96)

@Miljar
Copy link
Author

Miljar commented Jul 16, 2012

Just checked and it's fixed indeed!

@Miljar Miljar closed this as completed Jul 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants