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 :
$qb = $this->getEntityManager()->createQueryBuilder();
$qb->select('ed')
->from('Application\Entity\Object', 'ob')
->innerJoin('ob.fkLogin', 'lg')
->where("lg.state= 'valid'");
$query = $qb->getQuery();
$query->setHint(\Doctrine\ORM\Query::HINT_FORCE_PARTIAL_LOAD, true);
$objects= $query->getResult();
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 :
$object = $this->getEntityManager()->getRepository('\Application\Entity\Object')->find($id);
Thanks.