title: Removing an objectID of an object in an array with Mongoose
body: <p>I have the following in my clan scheme</p>
  
  <pre><code>var ClanScheme = new mongoose.Schema
  ({
      name: {type: String, unique: true},
      members: 
      [
        {
          user: {type: mongoose.Schema.Types.ObjectId, ref:'User', unique: true},
          wins: {type: Number, default: 0},
          losses: {type: Number, default: 0}
        }
      ],
  </code></pre>
  
  <p>How do I remove a user from the clan? I've tried a few methods this looking like the least code:</p>
  
  <pre><code>clan.members.remove({'user':userObj._id});
  clan.save(function(err)
  </code></pre>
  
  <p>It seems to run, but the user sticks in the document..</p>
  
  <p>Clan</p>
  
  <pre><code>{ _id: 55e5e8d017e055495dcc3643,
    name: 'DBz',
    __v: 9,
    rating: 1000,
    losses: 0,
    wins: 0,
    rank: 0,
    members: 
     [ { user: [Object], 
         _id: 55e5e8d017e055495dcc3644,
         losses: 0,
         wins: 0 },
       { user: [Object],
         _id: 55e5eb0f17e055495dcc3645, //&lt;&lt; 55e4ac0340f964d52f8e7fb7
         losses: 0,
         wins: 0 } ] }
  </code></pre>
  
  <p>User</p>
  
  <pre><code>{ _id: 55e4ac0340f964d52f8e7fb7,
    facebookid: '999',
    name: 'Joe Blogs',
    __v: 0,
    lastDevice: { device: 'Desktop', id: 'adsbr2fjui33emk9p6gtnfrulv' },
    multiplayer: 
     { clanid: 55e5e8d017e055495dcc3643,
       powers: [],
       world_commander: 0,
       losses: 0,
       wins: 0,
       clanname: 'DBz',
       rating: 1000,
       rank: 0,
       username: 'Joe' },
    saveDataSeed: 40wq211,
    saveData: 'yuV2hVJA00zYGm'}
  </code></pre>