Reputation: 3
I have the following query builder to add to my entity.
'query_builder' => function(\Teln\OperatorBundle\Entity\SoftswitchRepository $er) use ($idBase) {
$qb = $er->createQueryBuilder('t')
->where('t.base IN (:id)')
->setParameter('id', $idBase);
return $qb;
},
and $idBase= $builder->getData()->getBases();
So $idBase
is a collection.
How to add this to the where using IN ?
Upvotes: 0
Views: 900
Reputation: 359
Try to convert the parameter $idBase
to a simple array with the id's or a string
Upvotes: 3