Note that there are some explanatory texts on larger screens.

plurals
  1. POEntities passed to the choice field must be managed
    text
    copied!<p>i search the answers from internet but i can not find a reason: i have a table company, a table companyType, so : </p> <pre><code>/** * Acme\UserBundle\Entity\Company * * @ORM\Table(name="company") * @ORM\Entity */ class Company { /** * @var integer $id * * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $id; /** * @var CompanyType * * @ORM\ManyToOne(targetEntity="CompanyType") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="company_type_id", referencedColumnName="id") * }) */ private $companyType; ... </code></pre> <p>}</p> <pre><code>/** * Acme\UserBundle\Entity\CompanyType * * @ORM\Table(name="company_type") * @ORM\Entity */ class CompanyType { /** * @var integer $id * * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $id; /** * @var string $name * * @ORM\Column(name="name", type="string", length=45, nullable=true) */ private $name; .... public function __toString(){ return $this-&gt;name; } </code></pre> <p>}<br> and then , in the formtype class:</p> <pre><code>class CompanyForm extends AbstractType { public function buildForm(FormBuilder $builder, array $options) { $builder -&gt;add('name') -&gt;add('siren') -&gt;add('siret') -&gt;add('tvaCommun') -&gt;add('apeCode') ; $builder-&gt;add('activity','collection', array('type'=&gt; new ActivityForm())); $builder-&gt;add('companyType','entity',array( 'class' =&gt; 'AcmeUserBundle:CompanyType', )); } ... } </code></pre> <p>when i trying to use the form: </p> <pre><code> {{ form_row(company.companyType) }} </code></pre> <p>in the view, i got the error message.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload