Model
Product
Magento\Catalog\Model\ResourceModel\Product
What it does
This is the main resource model for Magento 2 products, handling all database operations for product entities including CRUD operations, attribute management, category/website associations, and SKU lookups.
Developers use this class when they need to load, save, delete products or retrieve product-related data directly from the database, bypassing the standard repository pattern for performance-critical operations or complex queries.
Public Methods
- getEntityType()
- getProductWebsiteTable()
- getProductCategoryTable()
- getWebsiteIds()
- getWebsiteIdsByProductIds()
- getCategoryIds()
- getIdBySku()
- delete()
- getCategoryCollection()
- getAvailableInCategories()
- getDefaultAttributeSourceModel()
- canBeShowInCategory()
- duplicate()
- getProductsSku()
- getProductsIdsBySkus()
- getProductEntitiesInfo()
- countAll()
- validate()
- load()
- save()
- _resetState()