title: jOOQ - join with nested subquery
body: <p>Let's say I want to find out who wrote <code>CLRS</code> in a book db (tables <code>BOOK</code>, <code>AUTHOR</code> with a junction table <code>BOOK_AUTHOR</code>).</p>
  
  <pre class="lang-java prettyprint-override"><code>SelectConditionStep&lt;Record1&lt;String&gt;&gt; query = create
          .select(AUTHOR.LASTNAME.as("AuthorName"))
              .from(
                      (
                              BOOK.leftOuterJoin(BOOK_AUTHOR).on(BOOK.ID.eq(BOOK_AUTHOR.BOOKID))
                      ).leftOuterJoin(AUTHOR).on(AUTHOR.ID.eq(BOOK_AUTHOR.AUTHORID))
              )
              .where(BOOK.TITLE.eq(CLRS_title))
          ;
  </code></pre>
  
  <p>A bit inefficient to match the entire table, just to select a single book. I now want to select that book prior to the match.</p>
  
  <p><a href="https://www.jooq.org/doc/3.11/manual/sql-building/table-expressions/nested-selects/" rel="noreferrer">The jOOQ doc on this matter</a> led me to believe that could look something like this:</p>
  
  <pre class="lang-java prettyprint-override"><code>Table&lt;Record1&lt;Integer&gt;&gt; clrs = create
          .select(BOOK.ID.as("bookID"))
              .from(BOOK)
              .where(BOOK.TITLE.eq(CLRS_title))
  
          .asTable()
          ;
  
  SelectJoinStep&lt;Record1&lt;String&gt;&gt; query = create
          .select(AUTHOR.LASTNAME.as("AuthorName"))
              .from(
                      (
                              clrs.leftOuterJoin(BOOK_AUTHOR).on(clrs.field("bookID").eq(BOOK_AUTHOR.BOOKID))
                      ).leftOuterJoin(AUTHOR).on(AUTHOR.ID.eq(BOOK_AUTHOR.AUTHORID))
              )
          ;
  </code></pre>
  
  <p>However, that fails to compile because </p>
  
  <pre><code>Cannot resolve method 'eq(org.jooq.TableField&lt;ch.cypherk.bookdb.public_.tables.records.BookAuthorRecord,java.lang.Integer&gt;)'
  </code></pre>
  
  <p>in the join condition.</p>
  
  <p>What's the correct way to write this join?</p>