A part from this question Magento 2.1: using the entity manager that was asked and answered a year ago, a lot can change in an year, I can't seem to find anything about the Entity Manager.

Should I start using the entity manager? Can anyone share some light on cases in which it should be used or not? What are the advantages of using it. And the disadvantages of not using it.


It's not recommended to use EntityManager and its infrastructure for your entities persistence. In the nearest future, new Persistence Entity Manager would be released which will cover all the requirements for persistence layer along with Query API as performance efficient APIs for Read scenarios.

Currently, it's recommended to use Resource Model infrastructure and make a successor of Magento\Framework\Model\ResourceModel\Db\AbstractDb class or successor of Magento\Eav\Model\Entity\AbstractEntity if EAV attributes support needed.

For filtering operations, it's recommended to use successor of Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection class.

See it in code

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.