未找到列:1054“字段列表”中的未知列“Comment.deferred_id” [英] Column not found: 1054 Unknown column 'Comment.deferred_id' in 'field list'
问题描述
所以我很新的,我创建一个Web应用程序与Cakephp框架和MySQL数据库。我在我的评论表中有一个列,名为deferred_id,它引用了我的延迟表中的id。我将其名称从deferred_id更改为注释表中的form_id,并在我的代码中的任何地方更改,但现在我在尝试测试我的应用程序时收到错误:
So I am pretty new to this and I am creating a web application with Cakephp framework and a MySQL database. I had a column in my "Comment" table called deferred_id which referenced the id in my deferred table. I changed the name of it from deferred_id to form_id in the comment table and changed it everywhere within my code as well but now I am getting an error when I try to test my application:
未找到列:1054字段列表中的未知列Comment.deferred_id
Column not found: 1054 Unknown column 'Comment.deferred_id' in 'field list'
不确定是什么问题,因为deferred_id不存在于注释表。任何帮助将是真棒。
Not sure what the problem is because deferred_id doesn't exist in the Comment table anymore. Any help would be awesome.
推荐答案
打开config / core.php中的调试级别, Cakephp将查询存储在缓存中。这就是为什么查询正在拾取旧的列名。
Turn on the debug level in config/core.php so that the cache gets cleared. Cakephp store the queries in cache. That is why the query is picking up the old column name.
这篇关于未找到列:1054“字段列表”中的未知列“Comment.deferred_id”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!