[Form] Made query parameter name generated by ORMQueryBuilderLoader unique

This commit is contained in:
Bernhard Schussek 2012-01-24 01:13:50 +01:00
parent 18f92cd331
commit c26b47af8d

View File

@ -71,11 +71,12 @@ class ORMQueryBuilderLoader implements EntityLoaderInterface
{ {
$qb = clone ($this->queryBuilder); $qb = clone ($this->queryBuilder);
$alias = current($qb->getRootAliases()); $alias = current($qb->getRootAliases());
$where = $qb->expr()->in($alias.'.'.$identifier, "?1"); $parameter = 'ORMQueryBuilderLoader_getEntitiesByIds_'.$identifier;
$where = $qb->expr()->in($alias.'.'.$identifier, ':'.$parameter);
return $qb->andWhere($where) return $qb->andWhere($where)
->getQuery() ->getQuery()
->setParameter(1, $values, Connection::PARAM_STR_ARRAY) ->setParameter($parameter, $values, Connection::PARAM_STR_ARRAY)
->getResult(); ->getResult();
} }
} }