magento2-connector-community
magento2-connector-community copied to clipboard
Integrity constraint violation: 1062 Duplicate entry 'XXXX-XXX-X' for key 'CATALOG_PRODUCT_ENTITY_VARCHAR_ROW_ID_ATTRIBUTE_ID_STORE_ID'
Environment and configuration
- Adobe Commerce Cloud - 2.4.4
- Akeneo - 103.2.1
Steps to reproduce
- When I am trying to sync products import, I am getting frequent error like below :
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'XXXX-XX-X' for key 'CATALOG_PRODUCT_ENTITY_INT_ROW_ID_ATTRIBUTE_ID_STORE_ID', query was: INSERT INTO
catalog_product_entity_int(
attribute_id,
store_id,
value,
row_id) SELECT XX AS
attribute_id, X AS
store_id,
tmp_akeneo_connector_entities_product.
XXXAS
value,
p.
row_idFROM
tmp_akeneo_connector_entities_productLEFT JOIN
catalog_product_entityAS
pON _entity_id = p.entity_id LEFT JOIN
staging_updateAS
sON p.created_in = s.id WHERE (s.is_rollback = 1 OR s.id IS NULL) ON DUPLICATE KEY UPDATE
attribute_id= VALUES(
attribute_id),
store_id= VALUES(
store_id),
value= VALUES(
value),
row_id= VALUES(
row_id)
This keeps on happening for varchar and both int attributes. I checked in the database that the value for specific attributes and entity_id/row_id is already there still akeneo is trying to put a new row in catalog_product_entity_varchar/catalog_product_entity_int Why akeneo is identifying it as a new value and adding it ?
Expected result
- The product sync should be completed.
Actual result
- Getting error