title: Strapi deep sort
body: <p>Let's say I have <code>modelA</code> with a ForeignKey on <code>modelB</code>.</p>
  <p>In <code>api/modelA/services/modelA.js</code>, I can define:</p>
  <pre class="lang-js prettyprint-override"><code>// [...]
  module.exports = {
    /**
     * Promise to fetch all records
     *
     * @return {Promise}
     */
    find (params, populate) {
      params = {
        ...params,
  
        _sort: 'field_from_model_a:DESC,other_field_model_a:ASC'
      }
      populate = [
        'modelB'
      ]
      return strapi.query('post').find(params, populate)
    },
  // [...]
  </code></pre>
  <p>This allows me to sort my query and I can also <strong>filter</strong> deep relations when using</p>
  <p><code>curl -X GET &quot;http://localhost:1337/modelA?modelB.field_from_model_b=example_value</code></p>
  <p>But I can't find how to sort on <code>modelB.some_field</code>.</p>
  <p>If I write <code>_sort: 'modelB.field_model_b:ASC'</code>, I get an error saying: missing FROM-clause entry for table &quot;modelB&quot;</p>