@d6y d6y released this Sep 26, 2016 · 21 commits to master since this release

Assets 2

Addition of the mappedWith method.
This allows a user to convert an HList shape mapping to a case class shape mapping using a Generic:

case class Address(id: Long, house: Int, street: String)

class Addresss(tag: Tag) extends Table[Address](tag, "addresses") {
  def id     = column[Long]("id", O.PrimaryKey, O.AutoInc)
  def house  = column[Int]("house")
  def street = column[String]("street")

  def * = (id :: house :: street :: HNil).mappedWith(Generic[Address])
}

Thanks @davegurnell and PR 10.