Scala projections in Slick for only one column
I'm following the Slick documentation example for autoincrementing fields and I'm having trouble creating a mapped projection that ... well, only has one column. case class UserRole(id: Option[Int], role: String) object UserRoles extends Table[UserRole]("userRole") { def id = column[Int]("ID", O.PrimaryKey, O.AutoInc) def role = column[String]("ROLE") // ... def * = id.? ~ role <> (UserRole, UserRole.unapply _) // NEXT LINE ERRORS OUT def forInsert = role <> ({t => UserRole(None, t._1)}, {(r: UserRole) => Some((r.role))}) returning id } The error is "value <> is not a member of scala.slick