【问题标题】:Generate Doctrine entities from database but not overwriting custom code in current Entity从数据库生成 Doctrine 实体但不覆盖当前实体中的自定义代码
【发布时间】:2019-03-28 18:59:34
【问题描述】:

关注:https://symfony.com/doc/current/doctrine/reverse_engineering.html

命令:php bin/console doctrine:mapping:import "App\Entity" annotation --path=src/Entity 覆盖当前的Entity/* 文件,而不是仅使用数据库中的新列更新它们。

在不覆盖现有实体文件中的自定义函数/逻辑的情况下,实用地从数据库更新实体的标准方法是什么?

【问题讨论】:

    标签: php symfony doctrine-orm


    【解决方案1】:
    php bin/console make:entity --regenerate
    

    似乎有助于在不覆盖的情况下从数据库中重新生成实体。

    【讨论】:

      猜你喜欢
      • 2014-12-26
      • 2013-06-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-01-01
      • 2020-07-14
      • 2019-08-26
      • 1970-01-01
      相关资源
      最近更新 更多