title: How to create PagingQueryProvider with multiple sortKeys?
body: <p>I want to create a <code>distinct on</code> query with <code>PagingQueryProvider</code>:</p>
  
  <pre><code>    PostgresPagingQueryProvider queryProvider = new PostgresPagingQueryProvider();
      queryProvider.setSelectClause("DISTINCT ON (first, second) *");
      queryProvider.setFromClause("mytable");
      Map&lt;String, Order&gt; sortKeys = new HashMap&lt;&gt;();
      sortKeys.put("first", Order.ASCENDING);
      sortKeys.put("second", Order.ASCENDING);
      sortKeys.put("third", Order.ASCENDING);
      queryProvider.setSortKeys(sortKeys);
  </code></pre>
  
  <p>Resulting sql generated from the provider:</p>
  
  <pre><code>SELECT DISTINCT ON(first, second) * FROM mytable ORDER BY first ASC, second ASC, third ASC;
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>ORDER BY items must appear in the select list if SELECT DISTINCT is specified
  </code></pre>
  
  <p>This query would be ok if it would be generated as follows:</p>
  
  <pre><code>SELECT DISTINCT ON(first, second) * FROM mytable ORDER BY first, second, third ASC;
  </code></pre>
  
  <p>But as its not: how can I achieve a correct distinct here?
  What is strange: when running the last query in pgAdmin against the DB, everything works correctly. BUt the query created by the <code>PagingQueryProvider</code> fails.</p>