Please advise how best to create / build forms based on the entity generated by the Doctrine. There is an option with handles to add in the essence of @Annotation, but during regeneration everything will be lost.

Wednesday - Zend Expressive + Doctrine

    1 answer 1

    Most likely you will regenerate the model after making changes to the database. So do not need to.

    The model is primary. You work with a model, you do not need to work directly with the database. There are migrations to maintain the database and model. For example, the doctrine / migrations package allows you to automatically generate SQL migrations based on changes in the model.

    Those. The overall process should be:

    1. Create / Edit Model
    2. Write or generate migration
    3. Perform migration to the database.

    http://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html

    • For sure! It is necessary to master the migration and work only with the model, as I understand it, the teams can only change the table in the database without changing the model? I don’t know anything about migration yet. Very helpful advice, thanks! - Drakulitka