With Slick, I am trying to project database table entries directly to the case class they represent. Following the example in the documentation, I set up a mapped projection usi
Companion objects of case classes usually are a function from the case class' first argument list to the case class. So if you had
case class Fnord(a: A, b: B, c: C)(d: D)
the Scala compiler would autogenerate the companion object similar to
object Fnord extends ((A, B, C) => Fnord) {
...
}
Now, as soon as you explicitly spell out something about the companion object yourself, the compiler no longer generates the FunctionN
extending thingy. Thus, most of the time it is a good idea to add it yourself. In your case that would mean defining the companion of SomeEntity3
like so:
object SomeEntity3 extends ((Int, Int, Int) => SomeEntity3) {
...
}
There's a (long open) issue for this behaviour, too: https://issues.scala-lang.org/browse/SI-3664