Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity extensions (using inheritance) are not removed when the entity is updated #1929

Closed
TimWuyts opened this issue Jun 19, 2021 · 1 comment
Labels

Comments

@TimWuyts
Copy link

Description
When you've an entity extension that uses inheritance, the remove method from the repositoryFactory is not working whenever you update the entity. The PATCH request is detecting the changes (deletion of the entity extension record), however it seems that those update is not being processed at all.

Additional context
Example: I've created a "productDocuments" entity extensions for the "product" entity. When I use the following line of code on an inherited product, the "productDocument" is not removed when the product is updated.

this.product.extensions.productDocuments.remove(item.id);

The PATCH request is identifying the changes (removal of a "productDocuments" item related to the product). But when the product entity is fetched again, the "productDocuments" item is still existing.

As a work-around I've used the following approach. But this requires additional logic on the product create/edit view (& a page refresh upon every action related to deleting "productDocuments" in my specific case) in order to keep everything behaving as expected.

this.productDocumentsRepository.delete(item.id, Shopware.Context.api);
@MarcelSchmaeing
Copy link
Contributor

Hello,

Within our company roadmap and work capacity, we try to address each bug or improvement request but admit that not each one will be resolved. To continue our culture of honesty and openness, we are closing this issue to focus on our roadmap on behalf of all Shopware users.

If you feel like this issue is still impacting you, please create a new issue and let us know.
Thank you again for your valuable feedback.

@MarcelSchmaeing MarcelSchmaeing closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2024
@github-actions github-actions bot added the Bug label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants