symfony - Doctrine 命令 : how to display file and line where error occured

标签 symfony doctrine mappedby

我是 Symfony 新手,正在开发一个应用程序。 我已经创建了 YAML 文件来生成 PHP 实体。当我运行此命令时:

php app/console doctrine:schema:update --force

我得到这个异常:

[Symfony\Component\Debug\Exception\ContextErrorException] Notice: Undefined index: mappedBy

没有更多解释。没有文件和行指向错误。

有什么方法可以让 Symfony 提供更多信息吗?

最佳答案

输入app/console -h以获取可用选项的完整列表。您可以通过 -v 选项来显示更多信息:

-v  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

关于symfony - Doctrine 命令 : how to display file and line where error occured,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37025723/

相关文章:

doctrine - 在 zf2doctrine2 查询中指定字段

jpa - 通过双向@ManyToMany : what is the reason映射

java - mappedBy 作为拥有关系的字段

php - Symfony 和 Doctrine 元数据缓存

Symfony2 从 URL 获取路由名称

php - 为什么运行 Laravel/Doctrine 原始数据库查询与使用 mysql cli 不同?

php - 在多对多表上使用左连接时,Symfony 3 返回错误的查询结果

java - 如何避免 hibernate 中的脏检查

forms - Symfony (3.2) 的 ChoiceType - 翻转键/值?

javascript - 使用 willdurand/BazingaJsTranslationBundle 的问题