Switched to use a query parameter in the ORM implementation
This commit is contained in:
parent
b6c4a582d3
commit
84c98d5b70
|
@ -31,7 +31,9 @@ class ElasticaToModelTransformer extends AbstractElasticaToModelTransformer
|
|||
$qb = $this->objectManager
|
||||
->getRepository($class)
|
||||
->createQueryBuilder('o');
|
||||
$qb->where($qb->expr()->in('o.'.$identifierField, $identifierValues));
|
||||
/* @var $qb \Doctrine\ORM\QueryBuilder */
|
||||
$qb->where($qb->expr()->in('o.'.$identifierField, ':values'))
|
||||
->setParameter('values', $identifierValues, 'array');
|
||||
|
||||
return $qb->getQuery()->setHydrationMode($hydrationMode)->execute();
|
||||
}
|
||||
|
|
|
@ -9,10 +9,6 @@ class Provider extends AbstractProvider
|
|||
/**
|
||||
* Counts the objects of a query builder
|
||||
*
|
||||
* OMG this implementation is radical. Yes. There seems to be
|
||||
* no easy way to do that with Doctrine ORM 2.0.
|
||||
* Please tell me if you have a better idea.
|
||||
*
|
||||
* @param queryBuilder
|
||||
* @return int
|
||||
**/
|
||||
|
|
Loading…
Reference in a new issue