title: Slick 3.0.0: How to query one-to-many / many-to-many relations
body: <p>Basically the same question has been asked about a year ago for slick 2.x (<a href="https://stackoverflow.com/questions/25547237/scala-slick-one-to-many-collections">scala slick one-to-many collections</a>). I'm wondering if there has any progression been made with the release of reactive slick.</p>
  
  <p>Let's say for example we have three tables. <code>library</code>, <code>book</code> and <code>library_to_book</code> where a library has many books. What I want is a list of libraries with their books. In scala this would be something like <code>Seq[(Library, Seq[Book])]</code>. The query I have is as follows:</p>
  
  <pre><code>val q = (for {
    l   &lt;- libraries
    ltb &lt;- libraryToBooks if l.id === ltb.libraryId
    b   &lt;- books if ltb.bookId === b.id
  } yield (l, b)
  db.run(q.result).map( result =&gt; ??? )
  </code></pre>
  
  <p><code>results</code> in this case is of type <code>Seq[(Library, Book)]</code>. How do I have to change my query to get a result of type <code>Seq[(Library, Seq[Book])]</code> instead? What is the "slick way" of writing such queries?</p>