I am looking for a way to list all items that are 10 days (for instance, my case would be a parameter for the threshold) old using a Java Peristence Query.
My Query
SELECT DISTINCT item
FROM Item item
INNER JOIN item.flags flag
WHERE flag.tspDate ............ :intDaysThreshold
I would like to be able to do something similar to what we can do in PostgreSQL using INTERVAL.
Thank you very much for help