symfony 关联id必须unset才会自动添加

数据库结构2个表:
user
----------
id
name
----------

book
----------
id
user_id(fk)
name
----------

bookForm.class.php的configure()设置

unset($this['user_id']);

这样embedForm后,user_id值自动添加为user的id值

This entry was posted in forms. Bookmark the permalink.

Comments are closed.