title: How to specify complex sort property as PageRequest parameter?
body: <p>My PageRequest is something like this</p>
  
  <pre><code>PageRequest pageReq = new PageRequest(0, 1, Direction.DESC, "lastDate-firstDate");
  </code></pre>
  
  <p>but when I run code I get error like this</p>
  
  <blockquote>
    <p>"Sort expression 'lastDate - firstDate : DESC' must only contain property references or aliases used in the select clause.</p>
  </blockquote>
  
  <p>here firstDate and lastDate are the name of entity Columns, and I want to get entity with highest difference in last and first Date.</p>
  
  <p>Any Idea how to that and what is wrong with above code?</p>