php bin /控制台make:crud在尝试创建新脚本时存在bug

问题描述 投票:-1回答:2

我在控制台中创建结局

php bin/console make:crud Location

效果很好。我去/ location /

“

点击新建并获得

 An exception occurred while executing 'SELECT e0_.id AS id_0, e0_.created AS created_1, 
 e0_.updated AS updated_2, e0_.updated_by_id AS updated_by_id_3, e0_.type AS type_4, p1_.name AS name_5, 
 p1_.email AS email_6, e0_.created_by_id AS created_by_id_7, e0_.permission_id AS permission_id_8, 
 p1_.relationships_id AS relationships_id_9, p1_.locations_id AS locations_id_10 FROM people p1_':

 SQLSTATE[42S22]: Column not found: 1054 Unknown column 'e0_.id' in 'field

好像那里有两个表。请帮助。

谢谢

symfony doctrine
2个回答
0
投票
请确保在创建或更改实体之后更新数据库架构。如果您想遵循文档,则必须使用迁移,但是如果您想立即进行更改,则可以执行

0
投票

people这是什么实体?查询在此表上,而不是Location

© www.soinside.com 2019 - 2024. All rights reserved.