Skip to content

Is it necessary to extend MagentoFrameworkModelAbstractModel for all custom model classes in Magento 2?

Is it necessary to extend MagentoFrameworkModelAbstractModel for all custom model classes in Magento 2?

I am working on a custom model that does not involve any database interactions (e.g., saving, loading, or deleting records), and I noticed that AbstractModel depends on deprecated components like MagentoFrameworkRegistry. Is it mandatory to extend MagentoFrameworkModelAbstractModel for all custom model classes?