Использование документации в Slick 3.1.0 в качестве источника для занятий:
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)
}
Я хотел бы иметь возможность сделать что-то вроде этого:
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)