Using documentation in Slick 3.1.0 as source for classes :
implicit class PersonExtensions[C[_]](q: Query[People, Person, C]) {
def withAddress = q.join(addresses).on(_.addressId === _.id)
def withContact = q.join(contacts).on(_.contactId === _.id)
}
I would like to be able to do something like this :
val chrisQuery = people.filter(_.id === 2)
val chrisWithAddressWithContact: Future[((Person, Address), Contact)] =
db.run(chrisQuery.withAddress.withContact.result.head)
val chrisWithContactWithAddress: Future[((Person, Contact), Address)] =
db.run(chrisQuery.withContact.withAddress.result.head)