Assume that I give to a function an array :
$arrValues = ['19', '4', '4', '18', '19']
To a function :
$objRequeteDoctrine = $this->getEntityManager()->createQueryBuilder()
->select('o')
->from('xxxxxx', 'o')
->where('o.id IN (:values)')
->andwhere('o.actif = 1')
->setParameter(':values', $arrValues );
return $objRequeteDoctrine->getQuery()->getResult();
Here, it'll retrieve 3 objects(duplicates removed). But what if I want to retrieve 5 objects, with duplicates ? Is that possible ?
Thanks.