title: mongodb findAndModify (upsert) insert field if document does not exist but don't update field if document being updated
body: <p>I want to use <code>findAndModify</code> (<strong>upsert</strong>) to modify a document. I want to do:</p>
  
  <ul>
  <li>The document must contain a field <code>created_at</code>;</li>
  <li>If a new document is being inserted, <strong>create</strong> this field</li>
  <li>However, if existing document is being inserted, <strong>don't</strong> <strong>update</strong> <code>created_at</code>.</li>
  </ul>
  
  <p>I use <code>findAndModify</code> as follows which will update <code>created_at</code> on every <code>upsert</code> which is not what I want.</p>
  
  <pre><code>  var acctsCollection = "accounts";
    account.created_at = new Date();
    account.newData = newData;
    var newUpdate = {
      $set : account
    };
    var options = {
      upsert  :true,
      new: true, 
    };
    collectionDriver.findAndModify(acctsCollection, query, newUpdate, options);
  </code></pre>