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
Support for bulk inserts #214
Comments
This package supports whatever Meteor's mongo package supports. I don't think it supports bulk insert. |
It does support bulk inserts. If I remove the schema for this collection Meteor inserts the documents from the array without an issue. |
OK, then we should probably support them, too. It doesn't seem to be a documented feature, though. |
@c316 see meteor/meteor#1255 (comment) I will wait until Meteor officially supports this, but we can keep this issue open to track. |
Any updates on this, I'm getting the error "Error: 0 is not allowed by the schema |
Agreed. Running into the same issue. |
+1 on this one :) |
Hi @aldeed is there an interim way for us to use bulk inserts? Need this. Thanks for your help. |
@myyellowshoe @nicooprat @SharadKumar Way back in February I used the mikowals:batch-insert package to do batch insert. It worked (at least back then when I was using -v < 1.3), but I've since modified my database schema in favor of a more efficient structure that did not require batch inserting. It just wasn't performant, especially with Meteor. Just my own experience though. Also ran into a huge bottleneck with doing schema validation on large database operations, which makes sense. I had to selectively skip validation for a few operations which obviously is not ideal. So it's important to recognize the advantages and disadvantages of no-sql when doing this sort of stuff. |
It's only in the NodeJS driver: https://mongodb.github.io/node-mongodb-native/api-generated/collection.html#insert But not supported by Collection / Collection2: https://docs.meteor.com/api/collections.html#Mongo-Collection-insert
It always puts them into one document:
Alternatives here: https://docs.meteor.com/api/collections.html#Mongo-Collection-insert |
Does this package support bulk insert operations? I have an array of documents (with _id's) and I want to insert them with a single command, but it appears that this isn't supported.
The text was updated successfully, but these errors were encountered: