Affects Version/s: None
Fix Version/s: 2.1.2
I did not know where to issue that component, but since this extension using the Doctrine Common namespace I thought it relevant to issue the bug here.
Consider the following shared fixures (as stated on jwage's github repo here: https://github.com/doctrine/data-fixtures)
In case if fixture objects have relations to other fixtures, it is now possible to easily add a reference to that object by name and later reference it to form a relation. Here is an example fixtures for Role and User relation
This will not use the last reference as a MANAGED entity but whether as a NEW one since the manager gets cleared (thus the unit of work) on each call to load() for the AbstractExecutor and thus marking any new references to the 'admin-user' considered a NEW entity, which should not be the case.
The current workaround is to directly fetch the entity using the EM's find() function, but that completely eliminates the main goal SharedFixtures' references are bringing.
I have provided the small patch that adress this issue, tests still pass.