Make use of the doctrine provider countObjects method

This commit is contained in:
ornicar 2011-05-09 09:56:31 -07:00
parent aed89aa8dc
commit 1ba79f83cf

View file

@ -37,7 +37,7 @@ abstract class AbstractDoctrineProvider implements ProviderInterface
public function populate(Closure $loggerClosure)
{
$queryBuilder = $this->createQueryBuilder();
$nbObjects = $queryBuilder->getQuery()->count();
$nbObjects = $this->countObjects($queryBuilder);
$fields = $this->extractTypeFields();
for ($offset = 0; $offset < $nbObjects; $offset += $this->options['batch_size']) {