MySQL Forums
Forum List  »  Newbie

Re: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row
Posted by: John Goutzamanis
Date: January 22, 2019 10:46AM

Peter Brawley Wrote:
-------------------------------------------------------
> Exactly as the error message says ...
>
> - the catalog_product_index_eav.entity_id column
> references catalog_product_entity.entity_id
>
> - so every catalog_product_index_eav.entity_id
> value must exist as a
> catalog_product_entity.entity_id value
>
> - but at least one of the entity_id values you are
> trying to insert does not meet that criterion.
>
> When writing code to insert or update columns
> which refer as foreign keys to other columns, best
> practice is to writ a transaction which checks
> that the proposed insert or update meets the
> foreign key critrion.

Thank you for your message. I didn't wrote the code of the indexer. My problem now how can I solve? Can you help me?

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.