$categories= array(3,20,24);
$qb = $this->em->createQueryBuilder();
$qb->select('p')
->from('\Entities\Productss', 'p')
->leftJoin('p.category', 'c')
->andWhere('p.id =?1')
->andWhere('p.id =?2')
->andWhere('p.id =?2')
->setParameter(1, $categories[0])
->setParameter(2, $categories[1])
->setParameter(3, $categories[2])
->getQuery();
这不允许多个wheres ...
$categories 是一个数组,其中包含必须匹配的类别才能选择正确的产品。如鞋(3),黑色(20),小(24)
可能的?