Order
Magento\Sales\Model\ResourceModel\Order
What it does
This resource model handles database operations for Magento 2 orders, including saving order data and managing order state transitions.
Developers use this class when they need to persist order information to the database, aggregate order items by product type, or ensure proper validation of order states before saving.
It automatically handles tasks like generating protect codes, calculating item counts, and storing store hierarchy information.
Public Methods
- aggregateProductsByTypes()
- save()