I am trying to map Coffee class via slick but with no luck:
object GlobalCoffee {
case class Coffee(uid: Long, coffeeType: String, h: PasswordInfo)
object Coffee
class Coffees(tag: Tag) extends Table[Coffee](tag, "Coffee") {
def uid = column[Long]("id", O.PrimaryKey, O.AutoInc)
def coffeeType = column[String]("coffeeType")
// passwordInfo
def hasher = column[String]("hasher")
def password = column[String]("password")
def salt = column[String]("salt")
def * = (uid, coffeeType, hasher, password, salt) <> ((t : (Long, String, String, String, Option[String])) => Coffee(t._1, t._2, PasswordInfo(t._3, t._4, t._5)), (c: Coffee) => Some((c.uid, c.coffeeType, c.h.hasher, c.h.password, c.h.salt)))
}
}
I am getting:
No matching Shape found.
[error] Slick does not know how to map the given types.
[error] Possible causes: T in Table[T] does not match your * projection. Or you use an unsupported type in a Query (e.g. scala List).
[error] Required level: scala.slick.lifted.ShapeLevel.Flat
[error] Source type: (scala.slick.lifted.Column[Long], scala.slick.lifted.Column[String], scala.slick.lifted.Column[String], scala.slick.lifted.Column[String], scala.slick.lifted.Column[String])
[error] Unpacked type: (Long, String, String, String, Option[String])
[error] Packed type: Any
[error] def * = (uid, coffeeType, hasher, password, salt) <> ((t : (Long, String, String, String, Option[String])) => Coffee(t._1, t._2, PasswordInfo(t._3, t._4, t._5)), (c: Coffee) => Some((c.uid, c.coffeeType, c.h.hasher, c.h.password, c.h.salt)))
[error] ^
[error] one error found
Does anybody have an idea what's messed up?