I'm upgrading:
hautelook/alice-bundle v1.4.1 -> v2.5.1
doctrine/doctrine-fixtures-bundle v2.4.1 -> 3.3.0
theofidry/alice-data-fixtures -> v1.1.2
I have a Group
entity, which is setup as a nested set @Gedmo\Tree(type="nested")
using Atlantic18/DoctrineExtensions
The question is pretty much an exact duplicate of Generating Doctrine fixture data for Nested Set entity with Alice Fixtures.
However the solution discussed there no longer works with the newer hautelook/alice-bundle
.
AppBundle\Entity\Group:
group_root:
title: <word()>
sub_group:
parent: '@group_root'
title: <word()>
Apparently, now that bundle works differently, flushing all fixtures at once. And the tree structure cannot be created with one flush as the child group doesn't yet have the id to it's parent. The result is:
Binding entities to query parameters only allowed for entities that have an identifier.
So I guess my question is, how could I modify the fixture loading process so it leaves certain fixtures to be flushed as a second step? Or could there be an alternative solution?