Slick 2.x filter on mapped column type (java.util.Date)
I am using java.util.Date in the model class. Since Slick doesn't support juDate out of the box, I've added an implicit mapping implicit val dateColumnMapper = MappedColumnType.base[Date, SqlDate](d => new SqlDate(d.getTime), d => d)
to my Table class for example .
But now I'm stuck in the filter by date: proposalsQuery.filter(_.since >= since)
. I've tried different options, but I always get compilation errors:value >= is not a member of scala.slick.lifted.Column[java.util.Date]
Since I am new to Scala / Slick working examples with simple explanation of the problem would be much appreciated.
Thank!
+3
source to share
2 answers