Make use of the doctrine provider countObjects method
This commit is contained in:
parent
aed89aa8dc
commit
1ba79f83cf
|
@ -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']) {
|
||||
|
|
Loading…
Reference in a new issue