title: MongoDB upsert with empty update document
body: <p>I'm trying to figure out how to insert a document into a collection iff the document is not already present in that collection. If the document is already present, the statement should be a no-op.</p>
  
  <p>The approach I'm taking it to use an upsert with an empty update document:</p>
  
  <pre><code>db.collection.update({ ...query... }, { }, { upsert: true })
  </code></pre>
  
  <p>But Mongo tells me that "Update documents cannot be empty". How can I accomplish this without needlessly updating the existing document? Thanks.</p>
  
  <p>Edit: My query document looks like this:</p>
  
  <pre><code>{
      "Chromosome" : "4",
      "Position" : 60000,
      "Identifier" : "rs1345",
      "ReferenceAllele" : "N"
  }
  </code></pre>