title: Compare MappedTo with raw type in Slick Query
body: <p>How do you compare MappedTo[T] with raw T columns?</p>
  
  <p>I have a problem (<strong>Cannot perform option-mapped operation</strong>) with this code:</p>
  
  <pre><code>for {
    toEventLink &lt;- Link.linksFromQuery(fromEntity).filter(_.toTable === Event.tableName)
    event &lt;- Event.table.filter(e =&gt; e.id === toEventLink.toId)
  } yield event
  </code></pre>
  
  <p>In: <code>e.id === toEventLink.toId</code> where <code>e.id</code> is an ID (extends MappedTo[Long]) and <code>toEventLink.toId</code> is a raw Long.</p>