title: MongoDB setOnInsert and push if already existent
body: <p>I would like to add a document if it does not exist and else add an element to one of it's sub-documents.</p>
  
  <pre><code>db.test.update(
    {
      name : 'Peter'
    },
    $setOnInsert : { 
        name : 'Peter', 
        visits: { 'en' : ['today'], 'us' : [] }
    },
    $push : {
        visits.en : 'today'
    },
    { upsert : true }
  )
  </code></pre>
  
  <p>If <code>Peter</code> exists, add an element to its <code>visists.en</code> or <code>visists.us</code> arrays. Else, create a document for <code>Peter</code>. This document should have the format for <code>visits</code> which should contain the current element (<code>'today'</code>).</p>
  
  <p>My issue is that I have <code>"have conflicting mods in update"</code>.
  I.e. (afaik), I cannot write to two things in one query. Yet how can I solve this dilemma?</p>