Search code examples
scalaplayframeworkplayframework-2.0slickslick-3.0

Slick "for/yield"-query doesn't compile with negative comparison


I ran into an odd problem with my slick-query: enter image description here

As you can see, the function below is compiling although it's basically the same query but with a possitive comparison (I don't know if it's actually doing what it's supposed to do, though). When swapping the order of the if conditions, it tells me that && cannot be resolved. I don't know if that's the case, but I guess the second table query object, in this case contents, doesn't seem to be finished yet. However, that begs the question why the second function/query is compiling properly.

Do you have an answer to this? Am I doing something wrong here?

Thanks in advance!


Solution

  • You should use =!= for inequality and === for equality in queries according to slick docs