0
我有文章管理模塊和標籤模塊 標籤僅僅是每行項目的單個標籤的symfony - embeddedForm - 多張複選框
我想要做的是嵌入所有標籤的列表(如複選框)插入我的文章模塊
我可以使用嵌入式表單嗎?
感謝
編輯:
這是我的架構:
article:
id: ~
title: { type: VARCHAR, size: '255', required: true }
tags: { type: VARCHAR, size: '500' }
created_at: { type: TIMESTAMP, required: true }
updated_at: { type: TIMESTAMP, required: true }
tag:
id: ~
tag: { type: VARCHAR, size: '500', required: true }
ord_id: { type: INTEGER, required: true }
created_at: ~
updated_at: ~
item_tag:
id: ~
item_id: { type: INTEGER, required: true, foreignTable: item, foreignReference: id, onDelete: cascade }
tag_id: { type: INTEGER, required: true, foreignTable: tag, foreignReference: id, onDelete: restrict }
created_at: ~
item:
id: ~
article_id: { type: INTEGER, foreignTable: article, foreignReference: id, onDelete: cascade }
所以,當我需要顯示的標籤和將更新上表
感謝
您是使用Doctrine還是Propel?我認爲你的意思是「模型」而不是「模塊」? – richsage 2011-01-26 14:38:35
我正在使用Propel。那麼我有一篇文章管理模塊(文章模型)和標籤管理模塊(標籤模型)和一個項目模型。你可以在上面的模式中看到關係。我只需要根據選項將複選框顯示爲複選框。這可能嗎? – terrid25 2011-01-27 09:18:06