title: MongoError: TypeError: Cannot read property 'id' of undefined, while using $or
body: <p>I'm using waterline,and I imported the database with the mongoimport command. I use the native driver to connect to mongo, calling .find and .aggregate. </p>
  
  <p>When using $or to lookup multiple records with results from a previous set of queries. The array looks something like </p>
  
  <pre><code>[{"\"ProductID\"": "76543"},{"\"ProductID\"": "74632"}, {"\"ProductID\"": "76534",...n}]
  </code></pre>
  
  <p>Pay no mind to the KEY, that is a temporary set up due to a control character in the file used to convert the csv to json and then mongoimporting the new file. </p>
  
  <p>I should be able to do the following query with the array. </p>
  
  <pre><code>collection.find({$or: arrayResults }).toArray().then(function(result)...
  </code></pre>
  
  <p>I then receive the error: <strong>MongoError: TypeError: Cannot read property 'id' of undefined</strong></p>
  
  <p>I was able to stop the error by making the array smaller. This wasn't designed to force its user's to query in batches but i'm not sure how to fix the problem. </p>
  
  <p>As a workaround, The aggregation framework $match stage doesn't seem to be having any problems. </p>
  
  <pre><code>collection.aggregate([{$match: {$or: arrayResults}}}]).toArray().then(....
  </code></pre>
  
  <p>This problem is I'm not using "id" in my query, so I don't understand whats wrong. </p>