How to create Doctrine 1 -style Soft-Delete in Doctrine 2

Tags:

Doctrine 1 has the concept of behaviors which you could add to your models. One of these was the soft-delete behavior, which allowed you to “delete” records without really deleting them. Doctrine 2 does not have behaviors due to various reasons. However, I needed a way to have a model which worked like soft-delete. Let’s see one approach to creating …