title: Use QueryHint when using JpaSpecificationExecutor
body: <p>I use spring data and the <code>JpaSpecificationExecutor::findAll</code> method to fetch my models. How I could use query hints when calling this method?<br>
  The above source code works fine but I can't set QueryHint for my JPA provider (in my case EclipseLink).</p>
  
  <pre><code>@Repository
  public interface ProductRepository extends JpaRepository&lt;Product, Integer&gt;, JpaSpecificationExecutor&lt;Product&gt; {
  }
  
  @Service
  public class ProductService {
  
      @Autowired
      private ProductRepository productRepository;
  
      public List&lt;Product&gt; findByTitle(String locale, String titleToSearch) {
          return productRepository.findAll((Root&lt;ProductCategory&gt; root, CriteriaQuery&lt;?&gt; query, CriteriaBuilder builder) -&gt; {
              return builder.equal(builder.function("jsonb_extract_path_text", String.class, root.&lt;String&gt;get("title"), builder.literal(locale)), titleToSearch);
          });
      }
  }
  </code></pre>
  
  <p>The way I use the Query Hints using spring-data is the above,  </p>
  
  <pre><code>@Repository
  public interface ProductRepository extends JpaRepository&lt;Product, Integer&gt;, JpaSpecificationExecutor&lt;Product&gt; {
  
      @QueryHints(value = {
          @QueryHint(name = org.eclipse.persistence.config.QueryHints.BATCH_TYPE, value = "JOIN"),
          @QueryHint(name = org.eclipse.persistence.config.QueryHints.BATCH, value = "p.productCategory"),
          @QueryHint(name = org.eclipse.persistence.config.QueryHints.BATCH, value = "p.productFileList")
      }, forCounting = false)
      @Query("SELECT p FROM Product p")
      public List&lt;Product&gt; find();
  }
  </code></pre>
  
  <p>I 've also found <a href="https://jira.spring.io/browse/DATAJPA-144" rel="noreferrer">this</a> which is unresolved yet.</p>