我有一个奇怪的错误,在由管理生成器创建的管理模块中:我的模型具有以下架构:
StmtcHelp:
columns:
module: { type: string(255) }
action: { type: string(255) }
content: { type: string(10000) }
translated: { type: boolean, notnull: true, default: false }
actAs:
Timestampable: ~
I18n:
fields: [content, translated]
我的generator.yml文件:
generator:
class: sfDoctrineGenerator
param:
model_class: stmtcHelp
theme: admin
non_verbose_templates: true
with_show: false
singular: ~
plural: ~
route_prefix: stmtc_help
with_doctrine_route: true
actions_base_class: sfActions
config:
actions:
_delete:
credentials: [is_super_admin]
_new:
credentials: [is_super_admin]
_create:
credentials: [is_super_admin]
fields: ~
list:
title: Inline Help
display: [ module, action, updated_at ]
filter:
display: [ module, action ]
form: ~
edit: ~
new: ~
现在我清除缓存并加载stmtc_help/index操作,出现了以下错误:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 's.content' in 'field list'.
Failing Query: "SELECT s.id AS s__id, s.module AS s__module, s.action AS s__action,
s.content AS s__content, s.translated AS s__translated, s.created_at AS s__created_at,
s.updated_at AS s__updated_at FROM stmtc_help s LIMIT 20"
看起来Doctrine没有将我的模型识别为I18n。
但如果我重新加载页面,错误就消失了,一切都正常运行。
是否有人遇到过这种问题?我错过了什么吗? 感谢任何帮助!