[英]symfony2 doctrine updating entities generates a .php file in entity directory
當我運行此命令時:
php app/console doctrine:generate:entities MyBundleName
所有的setter和getter方法都正確生成,除了它會在我的Entity目錄中生成一個.php文件
具有以下內容
<?php
namespace Goodeed\BEBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
*
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class extends EntityRepository
{
}
因此,如果我以跑步為例
php app/console doctrine:schema:update --force
我收到此錯誤:
我並不是很在意錯誤,因為刪除文件時,一切都會按預期進行,並且不會再出現其他錯誤。 所以我的問題是,什么原因會導致該.php文件的生成?
我的假設是您的實體中存在這種注釋:
@ORM\Entity(repositoryClass="YourBundle\Entity\ ")
使用此注釋,您提示的命令具有此行為。
希望這可以幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.