title: Doctrine 2 query missing part of inner join
body: <p>I'm using Doctrine 2 to try and do a query with an inner join. I have a Site entity and a Page entity. Each Site can have many pages and each page can only belong to one site. I have a site_id foreign key in my pages table rows. In my Site entity, I've created a OneToMany assocatiion where the target entity is my Page entity and the mappedBy is set to Site. </p>
  
  <pre><code>/**
   * @var \Doctrine\Common\Collections\ArrayCollection
   * @OneToMany(targetEntity="Page", mappedBy="Site", cascade={"persist", "remove"})
   */
  private $pages;
  </code></pre>
  
  <p>In my Page entity, I have a ManyToOne association where the target entity is set to Site. </p>
  
  <pre><code>/**
   * @var App\Entity\Site
   * @ManyToOne(targetEntity="Site")
   */
  private $site;
  </code></pre>
  
  <p>Here is my query builder statement where I'm passing a specific Site id:</p>
  
  <pre><code>$qb = $this-&gt;_em-&gt;createQueryBuilder();
  $qb-&gt;select('s')
      -&gt;from('App\Entity\Site', 's')
      -&gt;innerJoin('s.pages', 'p')
      -&gt;where('s.id = :id')
      -&gt;setParameter('id', $id);
  </code></pre>
  
  <p>and here is the actual SQL I get back:</p>
  
  <pre><code>SELECT s0_.id AS id0, s0_.domain AS domain1 FROM sites s0_ INNER JOIN  WHERE s0_.id = ?
  </code></pre>
  
  <p>See how the INNER JOIN information is completely missing? Am I doing something wrong here or is this a problem with Doctrine 2?</p>