title: Mongoose: $addToSet doesn't check for duplicates
body: <p>Could you please take a look at this code? I have duplicates.</p>
  
  <p>Here's the schema:</p>
  
  <pre><code>var Account = new Schema({
       username: String,
       votes:[
         {                                            
           resId: String,                                 
           upvoted:[String]                                                           
         }
       ]                                                                          
   });
  </code></pre>
  
  <p>I'm trying to add an item into <strong>votes</strong></p>
  
  <pre><code>var id = 'a';
  var resId = 'b';
  
  users.update({'_id':id},                
      {
           '$addToSet': {'votes': {'resId': resId}}
      }
  );
  </code></pre>
  
  <p>The problem is that after two updates I get two of them when I need only one:</p>
  
  <pre><code>[
   {
      'username': 'Fat Gandalf',
      'votes': [
         {
            '_id': objectID('11111111111111111111111'),
            'resId': 'b',
            'upvoted': []
         }
      ]
  },
  {
      'username': 'Fat Gandalf',
      'votes': [
         {
            '_id': objectID('2222222222222222222222'),
            'resId': 'b',
            'upvoted': []
         }
      ]
   }
  ]
  </code></pre>
  
  <p>How come $addToSet doesn't check for dupes here? Is there a workaround for this? Tried <strong>$push</strong> and it didn't work either. Many thanks in advance!</p>