title: Update not inserting a object in subarray,when upsert=true
body: <p>I am using mongodb update method with upsert=true.</p>
  
  <p>My data looks like this:</p>
  
  <pre><code>{"my_id":"1",
  "test_list":[{"test_id":1,"test_name":"pppp"}]}
  </code></pre>
  
  <p>now I am using the following command:</p>
  
  <pre><code>db.testcol.update({"my_id":1,"test_list.test_id":2},{"$set":{"test_list.$.test_name":"mmmm"}},true,true)
  </code></pre>
  
  <p>Now I want a new object inserted into the "test_list" as it does not exist</p>
  
  <p>but I am getting the error:</p>
  
  <pre><code>Cannot apply the positional operator without a corresponding query field containing an array.
  </code></pre>
  
  <p>I cannot use "insert" for my operation, as I dont know whether the data is their and the field needs to be updated,or its not their and needs to be inserted(for the first time)</p>