1

Looking at eav_setup file and trying to understand the difference between the eav/attribute and eav/entity_attribute table.

If I have to guess,

eav/attribute is the entity that represents the concept of attribute

eav/entity_attribute is also an attribute which additionally carries the concept of

  • attribute (the actual attribute)
  • entity type that I can describe (entity_type_id)
  • attribute set that I belong (attribute_set_id)
  • attribute group that I belong (attribute_group_id)

I'm not sure about the entity_type_id

When I create the attribute in Magento admin, I create the raw eav/attribute.
When I assign it to attribute set in the admin, I create the eav/entity_attribute. (but where does entity_type_id come from?)

Above statements are pure guesswork, please correct me if I'm wrong.

2 Answers 2

0
  1. Entity - Entity actually refers to data item. e.g. catalog_category_entity, catalog_product_entity, customer_entity, customer_address_entity
  2. Attribute - Attribute refers to the different attributes of an Entity. e.g. entity_type_id.
  3. eav_attribute - In this table all attributes for all the entities are stored.
  4. eav_entity_attribute - This table contains all the relations between an attribute, its attribute group and attribute set.
-1

entity_type_id comes from eav_entity_type table. This table contains the information regarding the entities.

entity_type_id entity_type_code 1 customer 2 customer_address 3 catalog_category 4 catalog_product 5 order 6 invoice 7 creditmemo 8 shipment

Your Answer

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

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