Symfony3执行' INSERT INTO时发生异常

时间:2017-03-05 01:32:13

标签: symfony

实体中的对象无法转换为字符串,我尝试了_toString方法,但没有任何效果 这是我的表格:

public function buildForm(FormBuilderInterface $builder, array $options) {
    $builder->add('dateDemandeRDV',DateTimeType::class)
        ->add('etatDemandeRDV',TextType::class)
        ->add('lettreLiaison',TextareaType::class)
        ->add('gsm',NumberType::class)
        ->add('emailDemandeRDV',EmailType::class)
        ->add('idPatient',EntityType::class, array(
                'class' => 'AppBundle:utilisateur',
                'choice_label' => 'id'
        ))
        ->add('idMedecinDemandeur',NumberType::class)
        ->add('idEtablissementDemandeur',NumberType::class)
        ->add('ok',SubmitType::class);
}

,错误文字是:

  

执行' INSERT INTO demande_r_d_v时发生异常   (Date_DemandeRDV,Etat_DemandeRDV,Lettre_Liaison,Gsm,   Email_DemandeRDV,Id_Patient,Id_Medecin_demandeur,   Id_EtablissementDemandeur)VALUES(?,?,?,?,?,?,?,?)'同   参数[" 2012-01-01"," saz"," azda",85245," adzazd@adzazd.com",{} ,   871,9665]:

     

Catchable Fatal Error:类AppBundle \ Entity \ utilisateur的对象   无法转换为字符串

0 个答案:

没有答案