if you have a one to one relationship or many-to-one relationship to render, and you do not want to use the 'collection' type to render the child entity, in fact, you can not. cause you are doing the inverse way, so ,just do this way:
public function buildForm(FormBuilder $builder, array $options) { $builder ->add('object',new ModerationObjectForm()) ->add('annonce',new AnnonceForm()); }
评论
发表评论