title: Compare joda.DateTime in filter
body: <p>I'm trying to a Column[DateTime] with a date time in filter, but just can't figure out how to make it work. </p>
  
  <pre><code>import play.api.Play.current
  import play.api.db.slick.Config.driver.simple._
  import play.api.db.slick._
  import org.joda.time.{DateTime, DateTimeComparator, DateTimeZone}
  
    private val dateComparator = DateTimeComparator.getInstance()
  
    implicit def dateTimeToScalaWrapper(dt: DateTime): DateTimeWrapper = new DateTimeWrapper(dt)
  
    class DateTimeWrapper(dt: DateTime) extends Ordered[DateTime] with Ordering[DateTime] {
      def compare(that: DateTime): Int = dateComparator.compare(dt, that)
      def compare(a: DateTime, b: DateTime): Int = dateComparator.compare(a, b)
    }
  
    implicit def jodaType = MappedColumnType.base[DateTime, Timestamp](
    {d =&gt; new Timestamp(d.getMillis)} ,
    {d =&gt; new DateTime(d.getTime, UTC)}
    )
  
    def removeTimeSlots(start: DateTime, end: DateTime, reservationId: Long) : Int = DB withTransaction { implicit session =&gt;
      timeSlots.filter(x =&gt; x.reservationId == reservationId &amp;&amp; x.startTime &gt;= start &amp;&amp; x.starTime &lt;= end).delete
    }
  </code></pre>
  
  <p>At the point where I compare x.startTime and start I get the following error: </p>
  
  <pre><code>Error:(90, -1) Play 2 Compiler: 
  Reservations.scala:90: polymorphic expression cannot be instantiated to expected type;
    found   : [R]scala.slick.lifted.Column[R]
    required: Boolean
  </code></pre>
  
  <p>Any chance I can make those comparisons in my code?  </p>