0
SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`bikeplus`.`eav_attribute`, CONSTRAINT `EAV_ATTRIBUTE_ENTITY_TYPE_ID_EAV_ENTITY_TYPE_ENTITY_TYPE_ID` FOREIGN KEY (`entity_type_id`) REFERENCES `eav_entity_type` (`entity_type_id`) ON DELETE CA), query was: INSERT INTO `eav_attribute` () VALUES ()

Plz, list all table are affected by eav_attribute.

1
  • at least show us your code... Commented May 28, 2018 at 15:31

2 Answers 2

0
**eav_entity_type** is the table where all the entities 
are define based on that you will come to know the related tables of eav.

 For example your **entiy_type** code is **catalog_product** or entiy_type is 4 
you will come to know all the attributes of the above entity type in 
following table (**eav_attribute**) From there ther will be multiple tables 
related based on the following column (**backend_type**) in eav_attribute table.
According to type from **eav_entity_type** the folowing table 
(**catalog_eav_attribute**) and consider backend_type is int the following table 
will have effect  (**catalog_product_entity_int**)
0

If it is magento2 you can solve to follow the below process.

Please reset the product attribute indexer.

php bin/magento indexer:reset catalog_product_attribute

Then run the entire reindex process

php bin/magento indexer:reindex

I hope it will help you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.