Relation
Magento\Catalog\Model\ResourceModel\Product\Relation
What it does
This resource model manages parent-child relationships between products in Magento 2, primarily used for configurable, grouped, and bundle products.
Developers use this class to add, remove, or rebuild product relations in the database, and to query which parent products are associated with specific child products.
It handles the database operations for the catalog_product_relation table.
Public Methods
- processRelations()
- addRelation()
- addRelations()
- removeRelations()
- getRelationsByChildren()