{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/1255","labels_url":"https://api.github.com/repos/meteor/meteor/issues/1255/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/1255/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/1255/events","html_url":"https://github.com/meteor/meteor/issues/1255","id":17301385,"number":1255,"title":"Bulk insertion of documents to minimongo, or Meteor.Collection","user":{"login":"alexhancock","id":427516,"avatar_url":"https://avatars.githubusercontent.com/u/427516?v=3","gravatar_id":"","url":"https://api.github.com/users/alexhancock","html_url":"https://github.com/alexhancock","followers_url":"https://api.github.com/users/alexhancock/followers","following_url":"https://api.github.com/users/alexhancock/following{/other_user}","gists_url":"https://api.github.com/users/alexhancock/gists{/gist_id}","starred_url":"https://api.github.com/users/alexhancock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexhancock/subscriptions","organizations_url":"https://api.github.com/users/alexhancock/orgs","repos_url":"https://api.github.com/users/alexhancock/repos","events_url":"https://api.github.com/users/alexhancock/events{/privacy}","received_events_url":"https://api.github.com/users/alexhancock/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meteor/meteor/labels/feature","name":"feature","color":"02d7e1"},{"url":"https://api.github.com/repos/meteor/meteor/labels/Project:Minimongo","name":"Project:Minimongo","color":"006b75"},{"url":"https://api.github.com/repos/meteor/meteor/labels/Project:Mongo%20Driver","name":"Project:Mongo Driver","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/meteor/meteor/milestones/4","html_url":"https://github.com/meteor/meteor/milestones/Winter%202015%20Mongo%20Maintenance","labels_url":"https://api.github.com/repos/meteor/meteor/milestones/4/labels","id":944811,"number":4,"title":"Winter 2015 Mongo Maintenance","description":"","creator":{"login":"glasser","id":16724,"avatar_url":"https://avatars.githubusercontent.com/u/16724?v=3","gravatar_id":"","url":"https://api.github.com/users/glasser","html_url":"https://github.com/glasser","followers_url":"https://api.github.com/users/glasser/followers","following_url":"https://api.github.com/users/glasser/following{/other_user}","gists_url":"https://api.github.com/users/glasser/gists{/gist_id}","starred_url":"https://api.github.com/users/glasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glasser/subscriptions","organizations_url":"https://api.github.com/users/glasser/orgs","repos_url":"https://api.github.com/users/glasser/repos","events_url":"https://api.github.com/users/glasser/events{/privacy}","received_events_url":"https://api.github.com/users/glasser/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":19,"state":"open","created_at":"2015-01-21T06:32:09Z","updated_at":"2015-03-06T04:38:52Z","due_on":null,"closed_at":null},"comments":14,"created_at":"2013-07-27T18:15:30Z","updated_at":"2015-04-29T01:02:55Z","closed_at":null,"body":"While working on a project with minimongo abstracted on its own, I noticed that the `minimongo` package, as well as `Meteor.Collection`s do not support bulk insertion when `insert` is passed an array of documents.\r\n\r\nThis mongodb manual [entry](http://docs.mongodb.org/manual/reference/method/db.collection.insert/#db.collection.insert) details the arguments that should be accepted by `insert`. The salient portion being...\r\n> Changed in version 2.2: The insert() method can accept an array of documents to > perform a bulk insert of the documents into the collection.\r\n\r\nI have prepared a small pull request (#1254) which adds support for bulk insertions to `minimongo` collections. I assume the server-side mongo driver already supports it, so this should bring minimongo's `insert` into parity with the actual mongo `insert` and the server-side mongo driver's implementation of this function.\r\n\r\nI have not yet written code to have `Meteor.Collection` conform to this change, but wanted to file this issue in case someone who knows the `Meteor.Collection` code in `mongo-livedata` better than I do wants to knock it out quickly.\r\n\r\nAgain, the PR is #1254 \r\n\r\nCheers"},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/97277540","html_url":"https://github.com/meteor/meteor/issues/1255#issuecomment-97277540","issue_url":"https://api.github.com/repos/meteor/meteor/issues/1255","id":97277540,"user":{"login":"ekatek","id":5854061,"avatar_url":"https://avatars.githubusercontent.com/u/5854061?v=3","gravatar_id":"","url":"https://api.github.com/users/ekatek","html_url":"https://github.com/ekatek","followers_url":"https://api.github.com/users/ekatek/followers","following_url":"https://api.github.com/users/ekatek/following{/other_user}","gists_url":"https://api.github.com/users/ekatek/gists{/gist_id}","starred_url":"https://api.github.com/users/ekatek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekatek/subscriptions","organizations_url":"https://api.github.com/users/ekatek/orgs","repos_url":"https://api.github.com/users/ekatek/repos","events_url":"https://api.github.com/users/ekatek/events{/privacy}","received_events_url":"https://api.github.com/users/ekatek/received_events","type":"User","site_admin":false},"created_at":"2015-04-29T01:02:55Z","updated_at":"2015-04-29T01:02:55Z","body":"Maybe? I don't remember what the current state of that branch is, and I would be a little surprised if upsert wasn't included in this. But, it has been a few weeks, and I remember very little about it, so give me a few days to figure this out."}}