找不到目标实体 Doctrine
The target-entity cannot be found Doctrine
我的问题是,当我尝试使用此命令更新 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 教程?因为官方的太bug了
问题出在文件 Bug.php 的命名空间中,命名空间的路径错误,它抛出了这个错误。
我的问题是,当我尝试使用此命令更新 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 教程?因为官方的太bug了
问题出在文件 Bug.php 的命名空间中,命名空间的路径错误,它抛出了这个错误。