I'm currently learning Symfony2 and I'm stuck on the forms. To be more specific, I try to set up a system of comment on an entity announcement.
Unfortunately, when creating the commentaireType.php, using the php app/console doctrine:generate:form OCPlatformBundle:Commentaires I have an error message is this:
[Twig_Error_Runtime] Key "advert" for array with keys "id, auteur, contenu, date, ip" does not exist in "form/FormType.php.twig" at line 29
I noticed that by removing the ManyToOne relation of the entity that I tie, I no longer have the error message.
/**
* @ORM\ManyToOne(targetEntity="OC\PlatformBundle\Entity\Advert", inversedBy="commentaires")
* @ORM\JoinColumn(nullable=false)
*/
private $advert;
Someone would have a solution to my problem? Thank you in advance !
Chiraq.