Now create the combobox, it is displayed correctly and it contains the correct value, but at the time of saving, it is entered in 0 in the database.
My code is as follows
->add('idBpCustomer', 'entity', array(
'class' => 'chriscrudBundle:BpCrpCustomer',
'property' => 'name',
'query_builder' => function (EntityRepository $er){
return $er->createQueryBuilder('c')
->orderBy('c.name','ASC')
;
},))
In the BpCrpCustomer entity
public function __toString(){
return $this->getName();
}
What do I need?