查询生成器在哪里IN arrayCollection

时间:2014-06-21 10:33:02

标签: symfony doctrine-orm

如何才能获得该查询返回结果? productCategory是与formItemPosition相关的对象的arrayCollection。

        $qb = $this->getQueryBuilder('fi');
        $items = $qb
                ->innerJoin('fi.formItemPosition', 'fip')
                ->where('fip.productCategory IN (:productCategories)')
                ->andWhere('fip.documentCategory = :documentCategory')
                ->setParameters(['documentCategory' => $documentCategory,
                    'productCategories' => $productCategories
            ]);

0 个答案:

没有答案