ddeboer/data-import — pull request #113 by gnat42 (2014-08-21 18:34:25+00:00)
Title: Pass the entityName to the entityManager clear()

There's no reason to clear the entitymanager of *all* entities. In our case we have pulled some linked associations for a particular workflow, however once the batchSize is up, suddenly doctrine detects new unmanaged entities and suggests adding a cascade={"persist"}. This will cause duplicate records to be created. We tried listening to the onClear event to reload however that presented other issues.

Since the import process shouldn't really affect other things the user may have done this change fixes that by only clearing entities of this particular class type.