Doctrine left join on unrelated entity
<p>Is there any way to do this. I'm getting more and more confused trying different things. </p>

<p>I have an entity conferences that can have a place. 
Places are in a many to one relationship with city.</p>

<p>In my query I'm trying to retrieve the city info but can't seem to retrieve it in the same place result.
This is the query used:</p>

<pre><code>$qbt = $this-&gt;_em-&gt;createQueryBuilder();
$qbt
    -&gt;select('conference', 'diffusion', 'speaker', 'placediff', 'confcity')
    -&gt;from('AppBundle:Conference', 'conference')
    -&gt;leftJoin('conference.diffusion', 'diffusion')
    -&gt;leftJoin('conference.speaker','speaker')
    -&gt;leftJoin('conference.place','placediff')
    -&gt;leftJoin('AppBundle:City', 'confcity', 'WITH', 'confcity.id = placediff.city');

return $qbt
    -&gt;getQuery()
    -&gt;setHint(\Doctrine\ORM\Query::HINT_INCLUDE_META_COLUMNS, true)
    -&gt;useQueryCache(true)
    -&gt;useResultCache(true, 3600)
    -&gt;getArrayResult();
</code></pre>

<p>This is what is returns, currently have only one conference. 
Would love to have the second array inside place though.</p>

<p><a href="https://i.stack.imgur.com/yTyCN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yTyCN.png" alt="query result"></a></p>

<p>Any ideas on how to accomplish this? Much obliged ~ </p>

<p>(UPDATE) In the meantime I switched to raw sql query but really looking for a way to do this using dql</p>

<pre><code>    public function rawConf()
    {
        $conn = $this-&gt;getEntityManager()-&gt;getConnection();
        $sql = 'SELECT
  c0_.id AS id,
  c0_.startAt AS startat,
  c0_.comment AS comment,
  d1_.id AS diffusion_id,
  d1_.hour AS diffusion_hour,
  s2_.id AS speaker_id,
  c0_.place_id AS place_id,
  c0_.sponsor_id AS sponsor_id,
  c0_.tour_id AS tour_id_8,
  d1_.movie_id AS diffusion_movie_id,
  s2_.contact_id AS speaker_contact_id,
  c6_.name AS ville_name,
  c6_.postal AS ville_post,
  c6_.department as ville_depart
FROM
  conference c0_
  LEFT JOIN conference_diffusion c3_ ON c0_.id = c3_.conference_id
  LEFT JOIN diffusion d1_ ON d1_.id = c3_.diffusion_id
  LEFT JOIN conference_speaker c4_ ON c0_.id = c4_.conference_id
  LEFT JOIN speaker s2_ ON s2_.id = c4_.speaker_id
  LEFT JOIN place p5_ ON c0_.place_id = p5_.id
  LEFT JOIN city c6_ ON (c6_.id = p5_.city_id)';

        $stmt = $conn-&gt;prepare($sql);

        $stmt-&gt;execute();

        return $stmt-&gt;fetchAll();

    }
</code></pre>