Skip to content

Instantly share code, notes, and snippets.

@tbje
Created February 5, 2014 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbje/8822113 to your computer and use it in GitHub Desktop.
Save tbje/8822113 to your computer and use it in GitHub Desktop.
case class User(name: String, email: String)
object User {} // <--- Notice this part here
// https://groups.google.com/forum/#!topic/scala-user/jyWBMz5Qslw
class Users(tag: Tag) extends Table[User](tag, "User") {
def name = column[String]("name", O.NotNull, O.PrimaryKey)
def email = column[String]("first", O.NotNull)
def * = (name, email) <> (User.tupled, User.unapply)
// Compile complains here ---^
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment