Hi I have the following simple code generating a compile error seems to be conflict with what the document says:
case class Task(id: Option[Int], title: String, note: Option[String])
class Tasks(tag: Tag) extends Table[Task](tag, "task") {
def id = column[Int]("title", O.PrimaryKey, O.AutoInc)
def title = column[String]("title")
def street = column[Option[String]]("note")
def * = (id.?, title, street.?) <> (Task.tupled, Task.unapply)
}
It will generate a compile error:
[error] /Users/admin/workspace/play/demo/app/models/Test.scala:36: could not find implicit value for evidence parameter of type scala.slick.ast.BaseTypedType[Option[String]]
[error] def * = (id.?, title, street.?) <> (Task.tupled, Task.unapply)
[error] ^
[error] one error found
[error] (compile:compile) Compilation failed
Do I miss something here? Thanks.