title: Get _id of an inserted document in MongoDB?
body: <p>say I have a product listing. When I add a new product I save it using something like</p>
  
  <pre><code>var doc=products.Insert&lt;ProductPDO&gt;(p);
  </code></pre>
  
  <p>The problem is that I want after this is done to redirect the user to the page with the product. So I need to redirect to say <code>/products/&lt;ObjectID&gt;</code>  </p>
  
  <p>However, I see no way of getting the ObjectID right afterwards without manually querying the database and look for a document with all the same fields and such. </p>
  
  <p>Is there an easier way? (also, <code>doc</code> in this instance returns null for some reason)</p>