一种形式-加到两个表中
|
我如何在Symfony 1.4和Doctrine中制作一种表格,将数据添加到两个表中?
一个表和模块的默认Symfony生成形式。在什么时候我可以对其进行编辑并添加自己的字段?
http://www.symfony-project.org/jobeet/1_4/Doctrine/zh/03
产生。
我想例如添加具有新类别的字段。
# config/doctrine/schema.yml
JobeetCategory:
actAs: { Timestampable: ~ }
columns:
name: { type: string(255), notnull: true, unique: true }
JobeetJob:
actAs: { Timestampable: ~ }
columns:
category_id: { type: integer, notnull: true }
(...)
expires_at: { type: timestamp, notnull: true }
relations:
JobeetCategory: { onDelete: CASCADE, local: category_id, foreign: id, foreignAlias: JobeetJobs }
此表单仅添加ID JobeetJob。我如何也可以添加到JobeetCategory?
没有找到相关结果
已邀请:
2 个回复
田眯衅
膏焦凑
}