R
R
Rodion Yurchenko2017-03-02 00:22:48
symfony
Rodion Yurchenko, 2017-03-02 00:22:48

How to remove setters and getters in Doctrine when Entity changes?

Good day
It was necessary to delete a couple of fields from Entity (I use a php file with annotations) I
deleted the description of the fields manually from the php file and generated the Entity again, and updated the database
But upon closer examination of the Entity, I found that the setters and getters of the deleted fields remained.
Of course, I can delete them manually, but - should there be an automated solution?
Or did I remove the fields incorrectly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladislav Vlastovskiy, 2017-05-23
@aassdds

There is no automated solution and there should not be.
Automation does not know for what purpose there may be methods in the entity class.
The fact that methods are getters and setters is a special case and is generated for rapid prototyping.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question