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