Is there a way to put a date range condition referencing the current time in a JPA query (that is compatible across databases)?
I can do
SELECT m FROM Mail m WHERE m.sentAt < :date
but I want to do it without having to bind a parameter (so that this can be configured as part of the named query repository and the date calculation logic does not have to enter the calling code).
So instead of :date
I need "currentTime minus 3 minutes" as a hard-code literal.