I\'m teaching myself some Scala and am currently getting my feet wet with slick (3.1) + play framework, so maybe the answer is simple here and I\'m missing something obvious. I
Your trouble here is your constructUser
is function of 4 parameters, while it supposed to be function of single Tuple4
Try to add type signatures.
This sample works for instance ( some simplifications included )
type Data = (Long, String, String, Option[String])
def constructUser: Data => User = {
case (id, username, passwordHash, email) => User(id, username, passwordHash, email)
}
def extractUser: PartialFunction[User, Data] = {
case User(id, username, passwordHash, email, _, _) =>
(id, username, passwordHash, email)
}
def * = (id, username, passwordHash, email) <> (constructUser, extractUser.lift)