QuestionQ59

VerifiedEAV/Database

How should a record be deleted from a database when its model inherits from the \Magento\Framework\Model\AbstractModel class?

Explanation

Models that extend Magento\Framework\Model\AbstractModel use the persistence layer’s delete operation to remove their associated database record. The delete() method triggers the model/resource deletion lifecycle; unset merely clears object data, and remove is not the applicable persistence method.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!