title: Sequelize.js: join tables without associations
body: <p>Is there a way to join tables that don't have associations defined using <code>include</code> in sequelize? This is not a duplicate of <a href="https://stackoverflow.com/questions/35789512/sequelize-joining-two-tables-which-are-not-associated">this</a>. I am talking about tables that are not associated at all but having columns that I want to join on.</p>
  
  <p>Example:</p>
  
  <pre class="lang-sql prettyprint-override"><code>select * from bank
  left outer join account 
      on account.bank_name = bank.name
  </code></pre>
  
  <p>The above query will return all records in table <code>bank</code> regardless of the existence of an <code>account</code> record where the specified constraints apply. </p>
  
  <p>In sequelize this would look something like the following, if models <code>bank</code> and <code>account</code> were associated on <code>account.bank_name = bank.name</code>:</p>
  
  <pre class="lang-javascript prettyprint-override"><code>bank.findAll({
      include: [{
          model: account,
          required: false,
      }]
  })
  </code></pre>
  
  <p>However, what if the models are not associated? Is there a way to write my own custom <code>on</code> section or equivalent:</p>
  
  <pre class="lang-javascript prettyprint-override"><code>bank.findAll({
      include: [{
          model: account,
          required: false,
          on: {
              bank_name: Sequelize.col('bank.name')
          }
      }]
  })
  </code></pre>
  
  <p>I vaguely remember reading something about this but I cannot seem to find that doc anywhere now. If you can point to the correct section in the docs it would be greatly appreciated.</p>