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

Properly handle Akeneo product "type" change #109

Open
mmenozzi opened this issue Nov 8, 2021 · 0 comments
Open

Properly handle Akeneo product "type" change #109

mmenozzi opened this issue Nov 8, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@mmenozzi
Copy link
Member

mmenozzi commented Nov 8, 2021

Let's assume that on Akeneo there's a simple Product with code A and this product has been already imported to Sylius having a Sylius Product with code A and a ProductVariant with code A.

Let's also assume that on Akeneo a new Product Model with code B is created and then the existing Product A is added to it using the "Add to an existing product model" bulk action.

In such situation, the subsequent Sylius import will fail the following error:

In ORMInvalidArgumentException.php line 114:

  A new entity was found through the relationship 'App\Entity\Product\ProductVariant#product' that was not
  configured to cascade persist operations for entity: . To solve this issue: Either explicitly call Entity
  Manager#persist() on this unknown entity or configure cascade persist this association in the mapping for
   example @ManyToOne(..,cascade={"persist"}).
@mmenozzi mmenozzi added the bug Something isn't working label Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant