Выберите отметку времени в диапазоне PSQL (SpringBoot @Query) - PullRequest
0 голосов
/ 08 апреля 2020
could not extract ResultSet; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet] with root cause
org.postgresql.util.PSQLException: ERROR: syntax error at or near ":"

У меня проблемы с выбором диапазона из двух временных отметок

@Query(value = "SELECT s.* FROM logines.work_hour s WHERE s.start_time between ?1 and now()::timestamp", nativeQuery = true)
List<WorkHour> findByStartTime(String startTime);
...