Skip to content

Conversation

@soyuka
Copy link
Member

@soyuka soyuka commented Aug 19, 2025

Could you check this @mrossard ?

@mrossard
Copy link
Contributor

I'm not able to test this right now, but doesn't this version skip purging the collection IRI on inserts? There's likely a better way to do this, but it likely involves a bigger refactoring - mapping the new entities to resources likely can only be done after flush(), and we were gathering the changed IRIs on flush before...i'll try looking at it when i'm back home.

@soyuka
Copy link
Member Author

soyuka commented Aug 20, 2025

I see, I've revised the patch I think it'll be fine like this.

@soyuka soyuka merged commit ecb3f6c into api-platform:4.2 Aug 20, 2025
107 of 114 checks passed
@soyuka soyuka deleted the fix/7319 branch August 20, 2025 09:18
@mrossard
Copy link
Contributor

mrossard commented Aug 20, 2025

This version should be better, but on insertions you won't get the collection IRIs purged for mapped entities. Still better than before 4.2 though.

I'll try to rework this when i get back - one "simple" fix might be to just add a "newEntities" array alongside the "tags" array, and add new entities to it in onflush() then do the mapping / iri gathering for those in postFlush().

@soyuka
Copy link
Member Author

soyuka commented Aug 20, 2025

No rush enjoy your time off :) I'll open an issue to track this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants