0

我的问题是,当我尝试使用此命令更新 ORM Doctrine 时:

vendor/bin/doctrine orm:schema-tool:update --force

我收到此错误:

In MappingException.php line 762:
The target-entity Product cannot be found in 'Bug#products'.  
orm:schema-tool:update [--complete] [--dump-sql] [-f|--force]

第 762 行的代码是:

{
    return new self("The target-entity " . $targetEntity . " cannot be found in '" . $sourceEntity."#".$associationName."'.");
}

问题出在哪里?或者有一些很好的教义教程?因为官方的太坑了。

4

1 回答 1

0

问题出在文件 Bug.php 的命名空间中,命名空间的路径不正确,它给我抛出了这个错误。

于 2018-02-07T21:49:46.117 回答