fzaninotto / Faker

Faker is a PHP library that generates fake data for you
MIT License
26.8k stars 3.57k forks source link

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

Closed jlekowski closed 4 years ago

jlekowski commented 4 years ago

Bug: https://github.com/fzaninotto/Faker/issues/1862 Clear specific entities is deprecated and will not be supported in Doctrine 3.0. (https://github.com/doctrine/orm/commit/9ccb8837e7f0bc605117024561c07e487a57eca0) Bug introduced: c49cd5438655043b487f4d986961746ae58edb3a Related issue: https://stackoverflow.com/questions/18215975/doctrine-a-new-entity-was-found-through-the-relationship

jlekowski commented 4 years ago

I tested that on my project with different batch sizes, but I don't generate many records.

Alternatively the whole c49cd5438655043b487f4d986961746ae58edb3a (batchSize option) could be reverted.