我在使用以下结构在sonata admin中实现一对多关系时遇到问题.
->add('adhesions', 'sonata_type_collection', array('by_reference' => false,'required' => false), array(
'edit' => 'inline',
'inline' => 'table',
'sortable' => 'position',))
Run Code Online (Sandbox Code Playgroud)
使用此选项:'edit'=>'inline',我丢失了AdhesionAdmin中定义的默认验证,如'required'=> true.
那么,是否有指定某处的设置?我试图在sonata_type_collection的设置中添加'cascade_validation'=> true但它没有改变.
另一个问题:我可以使用带有sonata_type_collection的弹出编辑表单吗?('edit'=>'标准')
任何指针和帮助都非常感谢.谢谢