title: How to write a Mongoose query for items whose IDs are not in an array
body: <p>I have two models: <code>Event</code> and <code>People</code>.</p>
  
  <pre><code>schemas.event = new mongoose.Schema({
      eventId: Number,
      name: {type: String},
      size: Number,
      location: {type: String},
      date: {type: Date},     
      people: [{type: mongoose.Schema.Types.ObjectId, ref: models.Person}],
      note: {type: String}
  });
  </code></pre>
  
  <p>and <code>People</code></p>
  
  <pre><code>schemas.person = new mongoose.Schema({
      firstname: {type: String},
      lastname: {type: String},
      age: Number,
      email: {type: String},
      gender: {type: String}
  });
  </code></pre>
  
  <p>Given a certain event, I want to do a Query using Mongoose, to find all the people not already registered for this event.</p>
  
  <p>Something like</p>
  
  <pre><code>models.Person.find({not in event.people});
  </code></pre>
  
  <p>The tricky thing for me is, that <code>event.people</code> is not an array of IDs, but rather it is an array of Objects that look like</p>
  
  <pre><code>[
          {
              "$oid": "558ced061d35bd072e7b5825"
          },
          {
              "$oid": "558ced061d35bd072e7b58a0"
          },
          {
              "$oid": "558ced061d35bd072e7b58c6"
          }
      ],
  </code></pre>
  
  <p>Is there any way to simply make this query?</p>