title: Spring data date between query
body: <p>I have a query like below:</p>
  
  <pre><code>select * from Products p where ? between  p.effctDate and p.expDate
  </code></pre>
  
  <p>Can I translate the above query to a spring data jpa query method? Like for example:</p>
  
  <pre><code>findByProductId(productId)
  </code></pre>
  
  <p>or I only have to use <strong>@Query</strong> or a <strong>Named query</strong> to handle such types of queries. I tried searching here first before asking the question as well as spring data site but did not find any solution. any help is appreciated.</p>