Changed QueryBuilder method from ->where() to ->andWhere() so it works with customised QueryBuilders which have an existing where clause (instead of over-writing any existing DQL 'where' part)
This commit is contained in:
parent
62f6cf0f8a
commit
b0841c18ec
|
@ -29,7 +29,7 @@ class ElasticaToModelTransformer extends AbstractElasticaToModelTransformer
|
||||||
$hydrationMode = $hydrate ? Query::HYDRATE_OBJECT : Query::HYDRATE_ARRAY;
|
$hydrationMode = $hydrate ? Query::HYDRATE_OBJECT : Query::HYDRATE_ARRAY;
|
||||||
|
|
||||||
$qb = $this->getEntityQueryBuilder();
|
$qb = $this->getEntityQueryBuilder();
|
||||||
$qb->where($qb->expr()->in(static::ENTITY_ALIAS.'.'.$this->options['identifier'], ':values'))
|
$qb->andWhere($qb->expr()->in(static::ENTITY_ALIAS.'.'.$this->options['identifier'], ':values'))
|
||||||
->setParameter('values', $identifierValues);
|
->setParameter('values', $identifierValues);
|
||||||
|
|
||||||
return $qb->getQuery()->setHydrationMode($hydrationMode)->execute();
|
return $qb->getQuery()->setHydrationMode($hydrationMode)->execute();
|
||||||
|
|
Loading…
Reference in a new issue