无法找到目标实体Doctrine

时间:2018-02-07 19:18:04

标签: php orm doctrine php-7.2

我的问题是,当我尝试使用此命令更新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."'.");
}

问题出在哪里?或者有一个很好的Doctrine教程?因为官方的那辆车非常多。

1 个答案:

答案 0 :(得分:0)

问题出现在文件Bug.php的命名空间中,命名空间有错误的路径,它给我带来了这个错误。

相关问题