A new entity was found through the relationship ....

Hallo,

ich habe in einem Shop eine API Fehlermeldung, mit der ich nicht wirklich etwas anfangen kann.
Diese tritt sporalisch auf, also nicht bei jeder abfrage. Wenn ich zwei mal die selbe Abfrage mache, kann es sein, das es mal funktioniert und mal nicht.

Als Fehler bekomme ich dann:

Module: API_Client -> API: No Success: Errormesage: A new entity was found through the relationship 'Shopware\Models\Attribute\Article#articleDetail' that was not configured to cascade persist operations for entity: Shopware\Proxies\ __CG__ \Shopware\Models\Article\Detail@00000000796406a4000000003a350794. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(..,cascade={"persist"}). If you cannot find out which entity causes the problem implement 'Shopware\Models\Article\Detail#__toString()' to get a clue. 

Was könnte diesen Fehler verursachen?

Beste Grüße
 

Ich bekomme quasi einen ähnlichen Fehler:

Exception: Multiple non-persisted new entities were found through the given association graph: * A new entity was found through the relationship ‘Shopware\Models\Article\Image#media’ that was not configured to cascade persist operations for entity: Shopware\Models\Media\Media@000000005f43b9780000000038150fe0. To solve this issue: Either explicitly call EntityManager#persist() on this unknown entity or configure cascade persist this association in the mapping for example @ManyToOne(…,cascade={“persist”}). If you cannot find out which entity causes the problem implement ‘Shopware\Models\Media\Media#__toString()’ to get a clue.