[英]Generate Doctrine entities from database but not overwriting custom code in current Entity
Following: https://symfony.com/doc/current/doctrine/reverse_engineering.html 以下: https : //symfony.com/doc/current/doctrine/reverse_engineering.html
The command: php bin/console doctrine:mapping:import "App\\Entity" annotation --path=src/Entity
overwrites current Entity/*
files, instead of just updating them with new columns from the database. 命令:
php bin/console doctrine:mapping:import "App\\Entity" annotation --path=src/Entity
覆盖当前的Entity/*
文件,而不是仅用数据库中的新列更新它们。
What is the standard method for updating entities pragmatically from the database without overwriting custom functions / logic in the existing Entity files? 在不覆盖现有Entity文件中的自定义函数/逻辑的情况下,从数据库中实际更新实体的标准方法是什么?
php bin/console make:entity --regenerate
似乎有助于从db重新生成实体而不会覆盖。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.