title: Strongloop Loopback REST Query and/or combined with between
body: <p>I have a simple model object with startDate and endDate properties.</p>
  
  <p>I can not seem to query with both 'and/or' and 'between' using the REST api. I would like to query 'between' a startDate range 'or' an endDate range. I would have thought that the following query would have worked:</p>
  
  <pre><code>?filter[where][or][0][event.startDate][between][0]=2017-01-15&amp;filter[where][or][0][event.startDate][between][1]=2017-01-22&amp;filter[where][or][1][event.endDate][between][0]=2017-01-15&amp;filter[where][or][1][event.endDate][between][1]=2017-01-22
  </code></pre>
  
  <p>Ideally I would have liked to query between event.startDate and event.endDate but loopback does not like the following query:</p>
  
  <pre><code>?filter[where][event.startDate][between][0]=2017-01-15&amp;filter[where][event.endDate][between][1]=2017-01-22
  </code></pre>
  
  <p>The queries work independently just fine:</p>
  
  <pre><code>?filter[where][event.startDate][between][0]=2017-01-15&amp;filter[where][event.startDate][between][1]=2017-01-22
  
  ?filter[where][event.endDate][between][0]=2017-01-15&amp;filter[where][event.endDate][between][1]=2017-01-22
  </code></pre>
  
  <p>Here is my model definition:</p>
  
  <hr>
  
  <p>models/event.json</p>
  
  <pre><code>{
    "name": "event",
    "plural": "events",
    "base": "PersistedModel",
    "idInjection": true,
    "options": {
      "validateUpsert": true
    },
    "properties": {
      "name": {
        "type": "string",
        "required": false
      },
      "startDate": {
        "type": "date",
        "required": false
      },
      "endDate": {
        "type": "date",
        "required": false
      }
    },
    "validations": [],
    "relations": {},
    "acls": [],
    "methods": {}
  }
  </code></pre>