I want to compare the date in database with current dateTime in JPA query :

captureLimitDate < currentDateTime

my requirement is as follows :

database.captureLimitDate : 04/07/2012 19:03:00 currentDateTime : 04/07/2012 20:03:00

My JPAQuery is this :

SELECT o FROM Operation o"
+ " WHERE ( o.merchantId =:merchantId ) AND "
+ "(o.captureLimitDate < currentDateTime ) ";

And Operation class has captureLimitDate as java.util.Date

    @Generated(value = "XA", comments = "0,_8BedAMXZEeGHf_Dj4YaPyg")
     private Date captureLimitDate;

I want to compare both current date and time . will the above query works. ??

Edit
Report