title: Sails.js - Querying array size
body: <pre><code>// Item.js
  schema: true,
  attributes: {
      testArray: {
          type: 'array',
          required: true,
          array: true
      }
  }
  </code></pre>
  
  <p>I would like to find all items where the <code>testArray</code> attribute have a specific length.</p>
  
  <p>I tried with this code below, but it doesn't work.</p>
  
  <pre><code>Item.find({testArray: {length: 2}}).exec(function (err, items) {
      console.log(items);
  });
  </code></pre>
  
  <p>I also tried with <code>minLength</code>, <code>maxLength</code>, <code>size</code>, but still no results.<br />
  Is there is a way to do that?</p>
  
  <p>I'm using <strong>MongoDB</strong> via <a href="https://github.com/balderdashy/sails" rel="nofollow">Sails.js</a>/<a href="https://github.com/balderdashy/waterline" rel="nofollow">Waterline</a>.</p>