title: MongoDB empty collection before insert document into db
body: <p>I'm trying to implement a function to empty the collection every time I populate document into the database. This doesn't work for me. I also tried using <code>async.series</code>, but still no luck. Why doesn't this code below work? The output always with <code>db.users.find().count()</code> gave me <code>0</code>.</p>
  
  <pre><code>function emptyThenInsert(db) {
    UserSchema.collection.remove({}, function(err) {
      if(err) console.log(err);
      UserSchema.collection.insert(db, function(err, data) {
        console.log(data);
        if (err) console.log(err);
        UserSchema.collection.find({}, function(err, data) {
          console.log(data);
          if (err) console.log(err);
        });
      });
    });
  }
  </code></pre>
  
  <p>It works if I take out <code>UserSchema.collection.remove</code>.</p>