doctrine / data-fixtures

Doctrine2 ORM Data Fixtures Extensions
http://www.doctrine-project.org
MIT License
2.77k stars 224 forks source link

Idea: unload method #193

Closed cezarykluczynski closed 1 year ago

cezarykluczynski commented 9 years ago

I've just started using this module and I found lack of unload() method puzzling. I'm using it for PHPUnit tests, so setup and teardown are two mandatory steps.

Purger just seems like a disproportionate solution for reverting fixtures.

What if I only want to delete the entities added by current fixtures class, and not purge the entire tables?

I've manage to wire up a unload() method myself. In load() method I'm loading all the created entities to an array, and storing EntityManager as a class property, and later, the unload() method can remove everything.

Stiil, I wonder why unload() isn't there?

dmitryuk commented 1 year ago

No interested persons on feature from 2015. Should we close the issue?

greg0ire commented 1 year ago

Let's close; there are IMO better ways to do this