php - Add property to database with the controller -


my application have 2 entity user , status, every user can add 0 or many status, use entity user in status form, when user want add status can add status user choice field. want every status take automatically id user? remove part status form :

>add('patient','entity',array('class'=>'doctorbundle:patient','property'=>'id','multiple'=>false))

and change status controller:

$id= $entity->setmedecin();         $form = $this->createform(new statuttype(), $entity, array(             'action' => $this->generateurl('statut_create'),             'method' => 'post',         ));      $form->add('submit', 'submit', array('label' => 'ajouter'));      return $form; } 


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -