Named query method to order a Page
<p>i'm new with JPA and i've spend days trying to figure out how to solve this. but simply i can't</p>

<p>i'm doing pagination on server side for my application using `PagingAndSortingRepository i can do it work fine, but when i try to add an order it breaks </p>

<p>Already i have this one working fine:</p>

<pre><code>Page&lt;Factura&gt; findByEstadoNotAndFechaCreacionBetween(String estado, Date from, Date to, Pageable pageable);
</code></pre>

<p>but if i want to add at the end or middle <code>OrderByIdFacturaDesc</code> it stop of working also tried add <code>By</code> before the order and still isn't working</p>

<p>Also i've tried to do:</p>

<pre><code>Page&lt;Factura&gt; findByEstadoNotOrderByIdFacturaDesc(String estado, Pageable pageable);
</code></pre>

<p>and works pretty fine, but i need filter on date.</p>

<p>Any idea what i'm doing wrong? </p>