1
0
mirror of https://github.com/fzaninotto/Faker.git synced 2025-04-20 07:21:57 +02:00

Fix (bug #1862): Do not clear entity manager for doctrine orm populator (#1995)

Bug: https://github.com/fzaninotto/Faker/issues/1862
Clear specific entities is deprecated and will not be supported in Doctrine 3.0. (9ccb8837e7)
Bug introduced: c49cd5438655043b487f4d986961746ae58edb3a
Related issue: https://stackoverflow.com/questions/18215975/doctrine-a-new-entity-was-found-through-the-relationship
This commit is contained in:
Jerzy Lekowski 2020-05-11 09:39:57 +01:00 committed by GitHub
parent 1fcc3430e8
commit 5337ce5261
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,11 +98,9 @@ class Populator
);
if (count($insertedEntities) % $this->batchSize === 0) {
$entityManager->flush();
$entityManager->clear($class);
}
}
$entityManager->flush();
$entityManager->clear($class);
}
return $insertedEntities;