私はドクトリンクエリビルダーを使用してこのクエリを実行しようとします
$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));
このエラーが発生します:
E_WARNING
class_parents()[function.class-parents]:オブジェクトまたは文字列が必要ですD:\ Doctrine \ ORM \ Mapping \ ClassMetadataFactory.php:224
しかし、この基準でselect('sr、a、p、s、t、tt')をフェッチすると、すべて正常に機能します。HYDRATE_ARRAYハイドレーションを使用すると、すべて正常に機能します。しかし、必要なのはtフィールドとttフィールドだけですが、これを行う方法はありますか?