Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The data fixtures can be loaded into the database using the
application:fixtures:load
command. All existing records areTRUNCATE
d from the database to ensure a clean start.Unfortunately, adding the data fixtures for (sub)decisions has proved to be quite difficult. As such, these have been removed. The WIP can be found in GEWIS/gewisweb#1913.
There is an issue with the "hydration" of the entities when they are added to the database. I have not seen this issue in GEWISDB, but the cause appears to be the usage of
BackedEnum
s as part of a composite key (which forms the foundation for our (sub)decision entities and relations).Either the enum cannot be cast to string while being saved to the database. Or when using custom mapping types (see the PR mentioned) above the value cannot be properly restored from the database. The latter can then also be fixed with another patch for ORM (see GEWIS/orm@8031547), however, this may break other things. This patch can probably also be applied in reverse, such that we do not need the custom mapping types. However, this has not (yet) been tested.
As such, this has to be investigated more and potentially a bug report must be submitted to Doctrine ORM to get this fixed.
Types of changes