title: ObjectID.createFromHexString not recognizing inputted hexstring
body: <p>I am going through Ciaran Jessup's walkthrough of creating a basic blog as an introduction to node.  When i try to view an article, I get the following error: </p>
  
  <pre><code>500 Error: Argument passed in must be a single String of 12 bytes or a string of 24 hex characters
  at Function.createFromHexString (/Users/me/Dropbox/projects/node/howtonode_blog/node_modules/mongodb/node_modules/bson/lib/bson/objectid.js:212:11)
  at /Users/me/Dropbox/projects/node/howtonode_blog/articleprovider-mongodb.js:38:64
  at /Users/me/Dropbox/projects/node/howtonode_blog/articleprovider-mongodb.js:16:10
  at Db.collection (/Users/me/Dropbox/projects/node/howtonode_blog/node_modules/mongodb/lib/mongodb/db.js:484:44)
  at ArticleProvider.getCollection (/Users/me/Dropbox/projects/node/howtonode_blog/articleprovider-mongodb.js:14:11)
  at ArticleProvider.findById (/Users/me/Dropbox/projects/node/howtonode_blog/articleprovider-mongodb.js:34:10)
  at app.post.articleProvider.addCommentToArticle.person (/Users/me/Dropbox/projects/node/howtonode_blog/app.js:51:19)
  at callbacks (/Users/me/Dropbox/projects/node/howtonode_blog/node_modules/express/lib/router/index.js:161:37)
  at param (/Users/matty/Dropbox/projects/node/howtonode_blog/node_modules/express/lib/router/index.js:135:11)
  at param (/Users/matty/Dropbox/projects/node/howtonode_blog/node_modules/express/lib/router/index.js:132:11)
  </code></pre>
  
  <p>Here are the relevant pieces of code:</p>
  
  <p>From app.js:</p>
  
  <pre><code>app.get('/blog/:id', function(req, res) {
    articleProvider.findById(req.param.id, function(error, article) {
      res.render('blog_show.jade',{title: article.title, article: article})
    })
  })
  </code></pre>
  
  <p>From articleprovider-mongodb.js:</p>
  
  <pre><code>ArticleProvider.prototype.findById = function(id, callback) {
      this.getCollection(function(error, article_collection) {
        if(error) callback(error);
        else {
          article_collection.findOne(
           // THIS IS THE LINE IN QUESTION BELOW
            {_id: article_collection.db.bson_serializer.ObjectID.createFromHexString(id)}, 
            function(error, result) {
              if(error) callback(error);
              else callback(null, result);
            }
          );
        }
      });
  };
  </code></pre>
  
  <p>I have tried to convert the <code>id</code> object to a string along with trying to pass it as an object directly.  However, my javascript is pretty bad, and I am having no luck.  I have tried passing <code>String(id)</code> and <code>id + ""</code> rather than <code>id</code> along with:</p>
  
  <p><code>{_id: id}</code></p>
  
  <p>and</p>
  
  <p><code>{_id: article_collection.db.bson_serializer.ObjectID(id)}</code></p>
  
  <p>I would really appreciate someone pointing out what I'm doing wrong.</p>
  
  <p>Thanks for reading!</p>
  
  <p><strong>EDIT:</strong>  <code>console.log("req.param.id is " + req.param.id)</code> outputs "req.param.id is undefined"
  The url, <code>http://localhost:3000/blog/516afb1064036bb345000001</code>, is correct, though, as I passed 516afb1064036bb345000001 directly to the <code>ArticleProvider.findById</code> call and it worked.</p>
  
  <p><strong>EDIT 2:</strong> It worked when I changed <code>req.param.id</code> to <code>req.params.id</code>.  However, in my <code>app.post</code> function I used the singular <code>param</code> as follows and still works:</p>
  
  <pre><code>articleProvider.save({
      title: req.param('title'),
      body: req.param('body')
    }  ...
  </code></pre>
  
  <p>Why is it that the singular <code>param</code> works here?  Does <code>params</code> refer specifically to parameters passed in the URI?</p>