title: Disable Lazy-Loading in doctrine 2 and ZF2
body: <p>actually i'm totaly new in doctrine 2 , i'm using it in a project by zendframework 2 , what i'm looking for is to disable the lazy-loading in doctrine 2 , i've this way for the custom queries :</p>
  
  <pre><code>$qb = $this-&gt;getEntityManager()-&gt;createQueryBuilder();
          $qb-&gt;select('ed')
                  -&gt;from('Application\Entity\Object', 'ob')
                  -&gt;innerJoin('ob.fkLogin', 'lg')
                  -&gt;where("lg.state= 'valid'");
  
          $query = $qb-&gt;getQuery();
          $query-&gt;setHint(\Doctrine\ORM\Query::HINT_FORCE_PARTIAL_LOAD, true);
          $objects= $query-&gt;getResult();
  </code></pre>
  
  <p>it's by using the setHint for the query , i'm asking how can i do the same for : fecthAll and findBy , find , for example for this query :</p>
  
  <pre><code>   $object = $this-&gt;getEntityManager()-&gt;getRepository('\Application\Entity\Object')-&gt;find($id);
  </code></pre>
  
  <p>Thanks.</p>