title: Compare current Date time in JPA query
body: <p>I want to compare the date in database with current dateTime in JPA query :</p>
  
  <p>captureLimitDate &lt; currentDateTime</p>
  
  <p>my requirement is as follows :</p>
  
  <p>database.captureLimitDate : 04/07/2012 19:03:00 
  currentDateTime : 04/07/2012 20:03:00 </p>
  
  <p>My JPAQuery is this :</p>
  
  <pre><code>SELECT o FROM Operation o"
  + " WHERE ( o.merchantId =:merchantId ) AND "
  + "(o.captureLimitDate &lt; currentDateTime ) ";
  </code></pre>
  
  <p>And Operation class has captureLimitDate as java.util.Date</p>
  
  <pre><code>    @Generated(value = "XA", comments = "0,_8BedAMXZEeGHf_Dj4YaPyg")
       private Date captureLimitDate;
  </code></pre>
  
  <p>I want to compare both current date and time . will the above query works. ??</p>