title: Spring Data - Custom DTO Query with filtering
body: <p>I have a complexe application and I need to retrieve and filter 1000~5000 object for an xls export. Each object having multiple eager relationship (I need them for the export).</p>
  
  <p>If I retrieve all the objects and their relationship as it is, I got some stackoverflow error.</p>
  
  <p>Generaly when I need to make a big export, in order to make it efficient I use a DTO object with an @Query like this : </p>
  
  <pre><code>public interface myRepository extends JpaRepository&lt;Car, Long&gt; {
  
      @Query("SELECT new com.blabla.myCustomObject(p.name, p.surname, c.model, c.number ...) "
              + "FROM Car c "
              + "LEFT JOIN c.person p "
              + "WHERE ... ")
      List&lt;myCustomObject&gt; getExportCustomObject();
  }
  </code></pre>
  
  <p>The problem is that the @Query is static and I want to add dynamic filter to my Query (Specifications, Criteria or some other system...)</p>
  
  <p>How to do it ? </p>