title: Update multiple tables with JOOQ
body: <p>the problem here with <code>jooq</code> is that it doesn't support <code>join</code> and <code>updates</code>, moreover updates on multiple tables.</p>
  
  <p>I find a way to transform this query:</p>
  
  <pre><code>   String query =   "UPDATE knowCRM.customer_did cd ";
          query +=    " LEFT JOIN knowCRM.know_service ks";
          query +=    " ON ks.id = cd.customer_service_id";
          query +=    " LEFT JOIN knowCRM.customer_flags cf";
          query +=    " ON ks.service_owner_id = cf.account_number";
          query +=    " SET cd.is_cli_number= 1, cf.is_cli_number = '0'";
          query +=    " WHERE ks.service_owner_id = " + accountNumber;
          query +=    " AND cd.did_number= " + cliNumber;
  </code></pre>
  
  <p><strong>into these two:</strong></p>
  
  <pre><code>        int count2 = wrapper.getCreate().update(CUSTOMER_DID)
                          .set(CUSTOMER_DID.IS_CLI_NUMBER, Byte.parseByte("1"))
                          .where(CUSTOMER_DID.CUSTOMER_SERVICE_ID.equal(
                                      wrapper.getCreate().select(KNOW_SERVICE.ID)
                                      .from(CUSTOMER_FLAGS, KNOW_SERVICE)
                                      .where(KNOW_SERVICE.ID.equal(CUSTOMER_DID.CUSTOMER_SERVICE_ID))
                                      .and(KNOW_SERVICE.SERVICE_OWNER_ID.equal(CUSTOMER_FLAGS.ACCOUNT_NUMBER))
                                      .and(KNOW_SERVICE.SERVICE_OWNER_ID.equal(accountNumber))
                                      .and(CUSTOMER_DID.DID_NUMBER.equal(cliNumber))
                                  ))
                          .execute();
  </code></pre>
  
  <p><strong>and</strong> </p>
  
  <pre><code>        int count3 = wrapper.getCreate().update(CUSTOMER_FLAGS)
                  .set(CUSTOMER_FLAGS.IS_CLI_NUMBER, Byte.parseByte("0"))
                  .where(CUSTOMER_FLAGS.ACCOUNT_NUMBER.equal(
                              wrapper.getCreate().select(KNOW_SERVICE.SERVICE_OWNER_ID)
                              .from(CUSTOMER_DID, KNOW_SERVICE)
                              .where(KNOW_SERVICE.ID.equal(CUSTOMER_DID.CUSTOMER_SERVICE_ID))
                              .and(KNOW_SERVICE.SERVICE_OWNER_ID.equal(CUSTOMER_FLAGS.ACCOUNT_NUMBER))
                              .and(KNOW_SERVICE.SERVICE_OWNER_ID.equal(accountNumber))
                              .and(CUSTOMER_DID.DID_NUMBER.equal(cliNumber))
                          ))
                  .execute();
  </code></pre>
  
  <p>I would like a more clever way to refactor this query with <code>jooq</code> whithout having to split it into two massive queries.</p>