title: How to insert a custom ObjectId with collection.insert() in mongoose
body: <p>I'm trying to batch insert several users into the database. For testing purposes I would like to set a specific ObjectId to each individual document. For some reason I can't insert a valid ObjectId. </p>
  
  <p>For example:</p>
  
  <pre><code>    var users = [
      {
          "_id": "56955ca46063c5600627f393",
          "name": "John"
      },
      {
          "_id": "56955ca46063c5600627f392",
          "name": "Doe"
      }
  ];
  
  User.collection.insert(users, function(err, docs) {
      if (err) {
          console.log("Error");
      } else {
          console.log("Succes")
      }
  });
  </code></pre>
  
  <p>...inserts in the mongoDB:</p>
  
  <pre><code>"_id" : "56955ca46063c5600627f393" //NOT ObjectId("56955ca46063c5600627f393")
  </code></pre>
  
  <p>This causes all sorts of problems when I try to query for a document with the specified _id.
  My original code works just fine but lacks the nice multi insert option:</p>
  
  <pre><code>var user1 = new User({
      "_id": "56955ca46063c5600627f393",
      "name": "John"
  });
  
  var user2 = new User({
      "_id": "56955ca46063c5600627f392",
      "name": "Doe"
  });
  
  user1.save(function(err, response){
      user2.save(function(err, response){
          if (err) console.log(err);
          else  console.log("ok");
          done();
      })
  });
  </code></pre>
  
  <p>inserts in mongoDB:</p>
  
  <pre><code>ObjectId("56955ca46063c5600627f393")
  </code></pre>
  
  <p>Is there a way to insert multiple documents in the database with a valid ObjectId?</p>