title: mongodb, get the result line after update
body: <p>I'm working with mongodb, node.js and socket.io and I'm trying to reduce the number off access to the database. I need to update a line ; and after to return the updated line this is how I do :</p>
  
  <pre><code>db.collection('users').update({_id:targetID}, {$set: { 'property': 'value' }}, {safe:true}, function(err, result) {
      db.collection('users').find({_id:targetID}).toArray(function(error, results){
          //a socket.io resend the content
      });
  });
  </code></pre>
  
  <p>It works, but I really fell like I'm having a useless step here. The callback of the update function seems to be a boolean.</p>
  
  <p>BTW, is there a better documentation than this one : <a href="http://docs.mongodb.org/manual/applications/update/" rel="nofollow">http://docs.mongodb.org/manual/applications/update/</a> ? I'd like to find a list of properties and methods. The <code>{safe:true}</code> for instance. It seems not working without it but I can't find it in the reference.</p>
  
  <p>Maybe I'm completely wrong and this is not the way I should do it. If you have a better idea... :)</p>