title: SQL / Doctrine : Left Join problem
body: <p>Currently this function works : it displays for a specific game, how many jobs there are.  </p>
  
  <p><strong>The problem</strong> : If there is no job, the game does not appear on the list.</p>
  
  <p>How to display the game even if there is no job attached ?</p>
  
  <p>Thanks</p>
  
  <pre><code>public function getWithGames()
      {
          $q = $this-&gt;createQuery('c')
              -&gt;leftJoin('c.stJob j')
              -&gt;where('j.expires_at &gt; ?', date('Y-m-d h:i:s', time()))
              -&gt;addOrderBy('c.name');
  
          $q-&gt;andWhere('j.is_activated = ?', 1);
          $q-&gt;andWhere('j.is_public = ?', 1);
  
  
          return $q-&gt;execute();
      }
  </code></pre>