ORM – non destructively delete entities in symfony2
•
Java
Is there a good, clean and simple way to delete entities non destructively in symfony 2? I want the administrator to have the opportunity to cancel the deletion of items while sacrificing as little automation as possible
If there is no built-in solution or third-party bundle to help me, what is the best way? Adding deleted attributes to entities will require a lot of added logic to prevent them from confusing the controller created by doctrine: generate: crud, so maybe they should be stored in a separate table in serialized form?
Solution
What you want is soft deletion There is a doctrine extension and bundle integrated with symfony
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码