title: Combine two OR-queries with AND in Mongoose
body: <p>I want to combine two OR-queries with AND in Monoose, like in this SQL statement:</p>
  
  <pre><code>SELECT * FROM ... WHERE (a = 1 OR b = 1) AND (c=1 OR d=1)
  </code></pre>
  
  <p>I tried this in a NodeJS module which only gets the model object from the main application:</p>
  
  <pre><code>/********** Main application ***********/
  var query = MyModel.find({});
  myModule1.addCondition(query);
  myModule2.addCondition(query);
  query.exec(...)
  
  /************ myModule1 ***************/
  exports.addCondition = function(query) {
    query.or({a: 1}, {b: 1});
  }
  
  /************ myModule2 ***************/
  exports.addCondition = function(query) {
    query.or({c: 1}, {d: 1});
  }
  </code></pre>
  
  <p>But this doesn't work, all OR-conditions will get joined together like in this SQL statement:</p>
  
  <pre><code>SELECT * FROM ... WHERE a = 1 OR b = 1 OR c=1 OR d=1
  </code></pre>
  
  <p>How can I combine the two conditions of <code>myModule1</code> and <code>myModule2</code> with AND in Mongoose?</p>