title: How to write DQL query innner join to avoid lazy loading?
body: <p>My code:</p>
  
  <pre><code>$entityManager = $this-&gt;getDoctrine()-&gt;getEntityManager();
      $result = $entityManager-&gt;createQueryBuilder()
                      -&gt;select('c')                        
                      -&gt;from('BlogHomepageBundle:Comment', 'c')
                      -&gt;innerJoin('BlogHomepageBundle:Post', 'po', 'WITH', 'c.postFk = po.postId')
                      -&gt;getQuery()-&gt;getResult();
      foreach ($result as $c) {
          //additional sql query
          echo $c-&gt;getPostFk()-&gt;getName();
      }
  </code></pre>
  
  <p>It works just fine, but when Im trying to get postFk ( post relate to comment one-to-many relation) I'm getting additional query to db ( lazy loading). Can I avoid this situtation to get all data in one DQL query ? Simple to performe sql query </p>
  
  <pre><code>select c.*, p.* from comment as c inner join post as p on c.post_fk = p.post_id
  </code></pre>
  
  <p>I want to use DQL ( not raw sql ).</p>
  
  <p><strong>EDIT</strong>
  I would like to have Objects and access to them like in foreach loop / not scalar data.</p>