title: MongoDB: Get all collections in one document
body: <p>I´ve got in some trouble with Javascript and mongoDB. I connected via:</p>
  
  <pre><code>var db = mongo.db(config.connectionString, { native_parser: true });
  </code></pre>
  
  <p>and bind my visitors collection <code>db.bind('visitors');</code>. So after I tried to get all documents in there with that line:</p>
  
  <pre><code>db.visitors.find(function (err, visitors) {
     if (err) deferred.reject(err.name + ': ' + err.message);
     deferred.resolve(visitors);
  });
  </code></pre>
  
  <p>So everything looks fine for me. But I get this error every time:</p>
  
  <blockquote>
    <p>angular.js:12011 GET <a href="http://localhost:3000/api/visitors/getAll" rel="nofollow">http://localhost:3000/api/visitors/getAll</a> 400
    (Bad Request)</p>
  </blockquote>
  
  <p>I thought its something with my api so I tried <code>...findOne({_id:1},..</code> and that worked. So did I missed something ?</p>