Closed firatgursoy closed 3 years ago
Database drivers not supporting after new time api also not recommend. I offer LocateDateTime now.
https://programminghints.com/2017/05/still-using-java-util-date-dont/
@Test void localDateTimeParamAndValueTest(){ Map<Long, LocalDateTime> map = factory.newQuery() .append("select i.id, i.updated from invoice i") .append("where i.updated > :updated", "updated", LocalDateTime.now().minusHours(5)) .extract(Extractors.newHashMapExtractor(Long.class, LocalDateTime.class)); Assertions.assertFalse(map.isEmpty()); }
Database drivers not supporting after new time api also not recommend. I offer LocateDateTime now.
https://programminghints.com/2017/05/still-using-java-util-date-dont/