I am having issues saving my entity that has a Instant value using the NamedJdbcTemplate. I receive the exception listed below and I am trying to determine the best way to resolve this. Please advise.
Can't infer the SQL type to use for an instance of java.time.Instant. Use setObject() with an explicit Types value to specify the type to use.
I am using the postgresql:9.4.1212
driver
java.tiime.Instant
. Why not useLocalDate
orLocalDateTime
? – CornflakesLocalDateTime
that does not carry any timezone information. Passing that throughsetObject()
works for me - at least with the most recent driver version, not sure if that old version supports that. – Cornflakes