Do you know any method of CreateBuilder (Doctrine), to read an array? Let me explain:
class ExamplesRepository extends EntityRepository {
public function FindArticulosPadresid($padre) {
return $this->createQueryBuilder('seccion')
->select('seccion.literal','seccion.id')
->where('seccion.id IN(:tpadre)')
->setParameter('tpadre', **array($tpadre))**
->getQuery()
->getResult();
}
}
I'm passing you a $ tpadre array, which is very simple contains whole numbers:
array(11)
{ [0]=> int(4)
[1]=> int(22)
[2]=> int(2)
[3]=> int(2)
[4]=> int(1)
[5]=> int(3)
[6]=> int(4)
[7]=> int(3)
[8]=> int(2)
[9]=> int(1)
[10]=> int(3) }
The problem esque only returns the first index (0), result of the QUERY Is there a Doctrine method that reads the entire array and returns all possible results?
Thank you.