shopware / shopware/shopware

Delete write array of mapping per entity on error

Open
#10,649 0 comments 0 reactions 0 assignees View on GitHub
domain/crm-after-sales extension/Migration-Assistant
Dominant language
PHP
Stars
3.4k
Forks
1.2k
Avg merge
3d 55m
Merged PRs (30d)
436

Description

Currently, an error occurs if an entity cannot be converted (e.g. due to empty fields) and another entity relies on it. This then leads to SQL errors when writing a second entity. E.g. Product and PropertyGroupOption.

This can be prevented by deleting the mapping for the entity that cannot be converted and then checking the mapping of the previous entity in the entity based on it. If there is no mapping for it, this entity is skipped.

A branch has already been created that shows a possible solution.

----

Zur Zeit kommt es zu einem Fehler, wenn eine Entity nicht konvertiert werden kann (z.B. durch leere Felder) und eine andere Entity sich darauf verlässt. Dann kommt es zu SQL-Fehlern beim Schreiben zweiten Entity. Z.B. Produkt und PropertyGroupOption.

Dies kann man verhindern, indem man das Mapping für die Entity, was nicht konvertiert werden kann löscht und dann bei der darauf basierende Entity auf das Mapping der vorherigen Entity überprüft. Wenn kein Mapping dafür besteht, wird diese Entity geskipped.

Dazu wurde schon ein Branch erstellt, der eine mögliche Lösung aufzeigt.

Contributor guide

Open the contributing guide

Research direction

Review the existing branch mentioned in the issue to understand the proposed handling of failed entity conversion and dependent mappings. Trace the entity-writing path around mapping deletion and dependency checks, then verify that dependent entities are skipped without producing SQL errors when a required mapping is absent.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, symfony
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.