title: Building go-pg ORM query for many to many relationship
body: <p>I've got 3 tables to represent my many to many relationship. customers, companies, companies_customers. </p>
  
  <pre><code>companies:
   - id
   - name
  
  customers:
   - id
   - username
  
  companies_customers:
   - id
   - customer_id
   - company_id
  </code></pre>
  
  <p>Now the query I want to run is to select all the customers with a company_id of 1. A raw SQL query could/might look something like this:</p>
  
  <pre><code>SELECT * FROM customers c INNER JOIN customers_companies cc ON c.id = cc.customer_id WHERE cc.company_id = 1
  </code></pre>
  
  <p>I've tried doing something like this in go-pg:</p>
  
  <pre><code>var customers []*Customer
  
  s.DB.Model(&amp;customers).Relation("Companies", func(q *orm.Query) (*orm.Query, error) {
      return q.Where("company_id = ?", companyID), nil
  }).Select()
  </code></pre>