title: sails Waterline criteria "complex" conditions
body: <p>I'm on a Node.js Sails app 0.10-rc4 with Waterline on mongoDB (sails-mongo adapter), and I've a model.where criteria condition that works good:</p>
  
  <pre><code>                or:
                  [
                      {
                          start: 
                          {
                              '&gt;': new Date(parseInt(req.param('start'))*1000),
                              '&lt;': new Date(parseInt(req.param('end'))*1000)
                          },
                          end: 
                          {
                              '&gt;': new Date(parseInt(req.param('start'))*1000),
                              '&lt;': new Date(parseInt(req.param('end'))*1000)
                          }
                      }
                  ]
  </code></pre>
  
  <p>... but I wanted to add a exception on it, something in algo that's like that :</p>
  
  <pre><code>      (
            (startq &gt; startparam AND startq &lt; endparam)
             OR
            (endq &gt; startparam AND endq &lt; endparam)
        )
         OR
        (
            (startq &lt; startparam AND endq &gt; endparam)            
        )
  </code></pre>
  
  <p>... but it seems like we can't use more than one OR ?</p>
  
  <pre><code>                or:
                  [
                      {
                          start: 
                          {
                              '&gt;': new Date(parseInt(req.param('start'))*1000),
                              '&lt;': new Date(parseInt(req.param('end'))*1000)
                          },
                          end: 
                          {
                              '&gt;': new Date(parseInt(req.param('start'))*1000),
                              '&lt;': new Date(parseInt(req.param('end'))*1000)
                          },
                          {
                              start: 
                              {
                                  '&lt;': new Date(parseInt(req.param('start'))*1000)
                              },
                              end: 
                              {
                                  '&gt;': new Date(parseInt(req.param('end'))*1000)
                              }
                          }
  
                      }
                  ]
  </code></pre>
  
  <p>I've tried many ways (with of without bracket)...</p>
  
  <pre><code>                or:
                  [
                      {
                          {
                              or:
                              [
                                  {
                                      start: 
                                      {
                                          '&gt;': new Date(parseInt(req.param('start'))*1000),
                                          '&lt;': new Date(parseInt(req.param('end'))*1000)
                                      },
                                      end: 
                                      {
                                          '&gt;': new Date(parseInt(req.param('start'))*1000),
                                          '&lt;': new Date(parseInt(req.param('end'))*1000)
                                      }
                                  }
                              ]
                          },
                          {
                                  start: 
                                  {
                                      '&lt;': new Date(parseInt(req.param('start'))*1000)
                                  },
                                  end: 
                                  {
                                      '&gt;': new Date(parseInt(req.param('end'))*1000)
                                  }
                          }
                      }
                  ]
  </code></pre>
  
  <p>... no one worked, most for the time I got:</p>
  
  <pre><code>     SyntaxError: Unexpected token {
  </code></pre>
  
  <p>The docs don't have examples on that syntax, there is a way to do it ?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Thx to Scott, here is the good syntax:</p>
  
  <pre><code>                or:
                  [
                      {
                          start: 
                          {
                              '&gt;': new Date(parseInt(req.param('start'))*1000),
                              '&lt;': new Date(parseInt(req.param('end'))*1000)
                          }
                      },
                      {
                          end: 
                          {
                              '&gt;': new Date(parseInt(req.param('start'))*1000),
                              '&lt;': new Date(parseInt(req.param('end'))*1000)
                          }
                      },
                      {
                          start: 
                          {
                              '&lt;': new Date(parseInt(req.param('start'))*1000)
                          },
                          end: 
                          {
                              '&gt;': new Date(parseInt(req.param('end'))*1000)
                          }
                      }
                  ]
  </code></pre>