fix: identify already tracked resources by ID AND type#7770
fix: identify already tracked resources by ID AND type#7770elfin-sbreuers wants to merge 1 commit intoapi-platform:4.2from
Conversation
currently entities with same ID are skipped since different entities can have the same ID.
|
Quite nice, if you could add a test it'd be awesome |
|
I want to help protect this fix with a regression test, but I don’t see any JSON:API tests in the suite I could build on. I’m happy to work on adding one — just looking for guidance on where it would fit best and how to start with it. |
|
|
|
Thanks for the pointers! I took a look at Regarding the Behat test, I’m not sure where to begin. I’m comfortable with JSON:API and Symfony (which is how I identified the underlying issue and fix), but I’d value some pointers on how best to integrate or update the test. |
Fixes a bug in JSON:API serialization where resources with the same numeric ID but different types were incorrectly considered duplicates.
Now, the type is combined with the id to uniquely identify each included resource, ensuring all distinct entities appear in the included section.