Slick 2.1
My case classes use Longs instead of java.sql.Timestamp or java.sql.Date
Queries in Slick throw errors like this (Postgres is db):
org.postgresql.util.PSQLException: ERROR: operator does not exist: timestamp with time zone >= bigint
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Position: 325
I have believe I have the implicits defined correctly and their imported in the proper places:
implicit val LongToTimestamp = MappedColumnType.base[Long, Timestamp](
longTS => new Timestamp(longTS),
sqlTS => sqlTS.getTime
)
implicit val LongToDate = MappedColumnType.base[Long, java.sql.Date](
longTS => new java.sql.Date(longTS),
sqlDate => sqlDate.getTime
)
What's wrong? I have implicits for other tables working that convert between JodaTime.DateTime / LocalDate and the SQL counterparts. Completely stuck on this one...
Thank you