I'm using java.util.Date in my model case class. Since Slick doesn't support j.u.Date out of the box, I added implicit mapping like so implicit val dateColumnMapper = MappedColumnType.base[Date, SqlDate](d => new SqlDate(d.getTime), d => d) to my Table class.
But now I'm stuck with filtering by date field: proposalsQuery.filter(_.since >= since). I tried different options but always get compilation errors: value >= is not a member of scala.slick.lifted.Column[java.util.Date]
Since, I'm new in Scala/Slick working examples with simple explanation of the problem would be highly appreciated.
Thanks!
implicit mapper MUST be available at the place where you write your filter query.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With