(WIP) Bug OneToMany => ManyToOne composite identifiers #550
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.
I added a behat test to reproduce an issue, for easy debugging use
./vendor/bin/behat -vv --stop-on-failure --name 'Relations support'
andrm -rf tests/Fixtures/app/cache/*
to clear the database before a second call.I set up a handmade ManyToMany relation, where the association table is entity-represented so that additional fields could be added to the relation (
RelatedToDummyFriend
).RelatedDummy
has a new OneToMany relation to this association entity (RelatedToDummyFriend
).RelatedToDummyFriend
referencesDummyFriend
on a ManyToOne basis.Here's the error:
Ref: https://github.com/api-platform/core/blob/master/src/Bridge/Symfony/Routing/IriConverter.php#L94 gets the full object instead of the
id
.This was working before #533, and this test will avoid future regression.
@Simperfit: as you worked on this, do you see where it could come from/any idea of a fix? Thanks!