title: Jooq entity mapping
body: <p>I have following schema:</p>
  
  <p>Projects (ID, NAME)
  Projects_Users (PROJECT_ID, USERS_ID)
  Users (NAME, ID)</p>
  
  <p>Entity are as follows </p>
  
  <pre><code>public class Projects {
  
      private String name;
      private long id;
      private List&lt;User&gt; users;
  
      public Projects() {
      }
  }
  
  
  public class User {
  
      private String name;
      private Long id;
  }
  </code></pre>
  
  <p>so clearly one-to-many. Projects can have multiple users. </p>
  
  <p>Now my goal is to write jooq query where I can fetch project objects already with corresponding users.</p>
  
  <pre><code>.select(PROJECT.NAME, PROJECT.ID, USERS)
  .from(PROJECT)
  .join(USERS_PROJECT).on(USERS_PROJECT.PROJECT_ID=PROJECT.ID)
  .join(USERS).on(USERS.ID=USERS_PROJECT.USER_ID)
  .fetchInto(Project.class);
  </code></pre>
  
  <p>but the query would resturn thousends results when expecting ~15</p>