Doctrine 2 join troubles

PQtameika

New Member
I try to do this query using doctrine query builder\[code\]$idAccount = $params['idAccount'];$qb = $this->_em->createQueryBuilder()->select('t,tt') ->from($this->_entityName, 'sr') ->innerJoin('sr.account', 'a') ->innerJoin('sr.product', 'p') ->leftJoin('p.title', 't') ->leftJoin('p.set', 's') ->leftJoin('s.idTitle', 'tt'); $qb->where($qb->expr()->eq('a.idAccount',$idAccount));\[/code\]end have this error:\[quote\] E_WARNING class_parents() [function.class-parents]: object or string expected D:\Doctrine\ORM\Mapping\ClassMetadataFactory.php : 224\[/quote\]but when I fetch select('sr,a,p,s,t,tt') with this criteria all works fine. and when i use HYDRATE_ARRAY hydration all works fine too. But I need only t and tt fields, is there any way to do this??
 
Back
Top