Note that there are some explanatory texts on larger screens.

plurals
  1. POSlick 2.0 and IntelliJ, highlighting errors
    text
    copied!<p>I'm in the process of migrating to Slick 2.0.0-RC1 (from 1.x), and I'm having trouble getting IntelliJ to recognize the lifted embedding implicits around the <code>TableQuery</code> statements. However, everything <em>does</em> compile, in both IntelliJ and sbt (read: play). I started by leveraging the new code generation feature, and just now I grabbed snippets from slick-examples verbatim — both produce the same behavior.</p> <p>Using the first example of lifted embedding (<a href="https://github.com/slick/slick-examples/blob/master/src/main/scala/com/typesafe/slick/examples/lifted/FirstExample.scala" rel="nofollow">https://github.com/slick/slick-examples/blob/master/src/main/scala/com/typesafe/slick/examples/lifted/FirstExample.scala</a>) the following two things occur:</p> <ul> <li><p>The line:</p> <pre><code>def supplier = foreignKey("SUP_FK", supID, suppliers)(_.id) </code></pre> <p>Produces an error on <code>suppliers</code> saying <code>Type mismatch, expected: TableQuery[NotInferredTT], actual: ((Tag) =&gt; FirstExample.Suppliers) =&gt; TableQuery[FirstExample.Suppliers]</code></p></li> <li><p>The <code>TableQuery[...]</code> vals (e.g., coffees) don't have any of the lifted collection-like operations on them (e.g., filter, map, take, etc.).</p></li> </ul> <p>Weirdly enough, using for-comprehensions doesn't produce any errors, however nothing has the right type information (ends up as an <code>Any</code>).</p> <p>I'm positive that I've got the <code>.simple._</code> import (it doesn't compile elsewhere without it). I've cleared all my caches, rerun my gen-idea, done full rebuilds, etc. with no progress. I'm running IntelliJ 12.1.6 Ultimate with the Scala 0.22.302 plugin. My own project uses SQLServer, but I tried the example with H2 and experienced the same thing.</p> <p>Can someone point me in the right direction?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload