16
Possible Duplicate:
Example of using CURRENT_DATE in JPA query
I am trying to add a query to my repository to compare a date stored in the db against the current date.
My query is like this:
@Query("Select c from Customer c where c.terminated != 1 or c.terminationDate > <currentDate>")
public List<Customer> getTerminatedCustomers();
What can I insert for <currentDate>?
If everything fails I could add a parameter to the method and pass the current date to the query like this. But I would prefer a more elegant solution, if possible.