title: nodejs mongodb object id to string
body: <p>IN nodejs, with mongodb, mongoosejs as orm</p>
  
  <p>I am doing this</p>
  
  <p>I have a model, User</p>
  
  <pre><code>User.findOne({username:'someusername'}).exec(function(err,user){
  console.log(user) //this gives full object with something like {_id:234234dfdfg,username:'someusername'}
  //but
  
  console.log(user._id) //give undefined.
  })
  </code></pre>
  
  <p>Why? And how to get the _id to string then?</p>