def uuid = column[UUID]("uuid", O.PrimaryKey)
case class Foo private(uuid, ...)
--
---
You received this message because you are subscribed to the Google Groups "Slick / ScalaQuery" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalaquery+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/f56e3434-1be6-4978-85ea-2fbd9eda4536%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/80ab90b1-1bcd-4954-bd06-179f9481a54b%40googlegroups.com.
abstract case class User(foo: Int, name: String, id: Option[Int] = None)
object User { def apply(name: String): User = new User(1, name){}}class Users(tag: Tag) extends Table[User](tag, "USERS") { // Auto Increment the id primary key column def id = column[Int]("ID", O.PrimaryKey, O.AutoInc)
// The name can't be null def name = column[String]("NAME")
// the * projection (e.g. select * ...) auto-transforms the tupled // column values to / from a User def * = (name, id.?) <> (User.apply, User.unapply)}
Error:(58, 33) type mismatch; found : String => User required: ((Int, String, Option[Int])) => User def * = (name, id.?) <> (User.apply, User.unapply) ^
Error:(58, 24) No matching Shape found.Slick does not know how to map the given types.Possible causes: T in Table[T] does not match your * projection. Or you use an unsupported type in a Query (e.g. scala List). Required level: slick.lifted.FlatShapeLevel Source type: (slick.lifted.Rep[String], slick.lifted.Rep[Option[Int]]) Unpacked type: (Int, String, Option[Int]) Packed type: Any def * = (name, id.?) <> (User.apply, User.unapply) ^
To view this discussion on the web visit https://groups.google.com/d/msgid/scalaquery/0f2390eb-069b-4f19-be81-35b0b93cc876%40googlegroups.com.