I have a JPA named query that takes two dates in order to return records with a date column entry between the two dates.
If I enter the same date for both the start and end dates it returns no rows, even though there are records for that date.
Is there way to make the query work or shall I just run another query when the two dates are the same?
Here's the query:
select o from CustomerOrder o
where o.orderDate between :date_from and :date_to
order by o.orderDate desc