we ran into an issue yesterday and I wanted to clearify things here just to ensure this is not a bug…
For a bundle we created we added demo fixtures (under <path_to_bundle>/Migrations/DataFixtures/Demo/ORM/v1_0 like in the OroPlatform bundles). Running those went perfectly fine. Now we created new entities and wanted to extend demo fixtures. We introduced a new folder 1_1 and added a Fixture class in there. Running the fixtures load command works perfectly fine, if the “demo_data_version” of database table “oro_installer_bundle_version” is already set to “v1_0”. But: if we install our app on a new dev environment we run into the problem, that the fixture files are not processed in the expected order. Somehow, the 1_1 fixtures are loaded in a mixed order with tose of 1_0. As our 1_1 depend on the data of 1_0 fixtures we get an error. I tried to set a dependency via DependentFixtureInterface but that leads the dependent 1_0 fixtures file to be executed although 1_0 fixtures where already loaded before and the database indicates that. So either the fixtures loading for a clean new environment fails or the incrementation/delta approach for those environments where fixtures for v1_0 where already loaded.
So my question is: is the way fixtures loading is implemented right now in oro providing “incremental” fixtures? Is it supposed to provide that? Are we doing something wrong? Should we delete the old 1_0 fixtures and create completely new ones for 1_1? But that would need to also include deleting data that was added in 1_0 fixtures as well and I think at later versions that somehow gets ugly… And why would we use versions then at all?
Thanks for reply :)
And again thanks for your great effort and congrats to first stable version!
The forum ‘OroPlatform – How do I? Questions’ is closed to new topics and replies.