I have a JPA mapped "event" object that includes a timestamp column. I am trying to select all events that occurred on a specific date. To do this I need to ignore the time component of the timestamp. I am not sure that this is possible using non database specific functions? Something like this fails to select:
@Query("SELECT r FROM BioChemRequest r WHERE r.pasId = :pasid AND r.observationDate BETWEEN :startDate AND :startDate") public List <BioChemRequest> find(@Param("pasid") String pasid , @Param("startDate") Date startDate);