title: show entity in second level of array in symfony
body: <p>I don't know the exact term for showing the entity in second level of array.
  I have entity Doctor. see my list in my image</p>
  
  <p><a href="https://i.stack.imgur.com/vja3O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vja3O.png" alt="enter image description here"></a></p>
  
  <p>If you can see the entity Person under the Doctor list. It display the Person entity like firstName and lastName. How can I show the same in facilityPackageDoctors? I expect it shows the package name and the facility, and what it displays now is not the list of facilityPackageDoctors. Here is my query </p>
  
  <pre><code>public function getFacilityPackageDoctors($facilityId){    
      $query = $this-&gt;createQueryBuilder('d')
              -&gt;leftJoin('d.facilityPackageDoctors', 'fpd')
              -&gt;leftJoin('fpd.facilityPackage', 'fp')
              -&gt;where('fp.facility = :parameter')
              -&gt;setParameter('parameter', $facilityId)
              -&gt;getQuery();
      return $query-&gt;getResult();
  }
  </code></pre>
  
  <p>Do I have something to setup on this? sorry for the term I used. </p>