the problem is that if mapped option is set to true, i get this error:
The form's view data is expected to be of type scalar, array or an instance of \ArrayAccess, but is an instance of class ProxiesCG\MyBundle\Entity\CompanyGroup. You can avoid this error by setting the "data_class" option to "ProxiesCG\MyBundle\Entity\CompanyGroup" or by adding a view transformer that transforms an instance of class ProxiesCG\MyBundle\Entity\CompanyGroup to scalar, array or an instance of \ArrayAccess.
if mapped option is set to false i have to implement everything "by hand", and i'd like to let symfony do his job.
do you know what im doing wrong? could it be related to symfony 2.4 version?
hi,
im using symfony 2.4 and my "Company" form includes an autocomplete field to map a CompanyGroup:
the problem is that if mapped option is set to true, i get this error:
The form's view data is expected to be of type scalar, array or an instance of \ArrayAccess, but is an instance of class ProxiesCG\MyBundle\Entity\CompanyGroup. You can avoid this error by setting the "data_class" option to "ProxiesCG\MyBundle\Entity\CompanyGroup" or by adding a view transformer that transforms an instance of class ProxiesCG\MyBundle\Entity\CompanyGroup to scalar, array or an instance of \ArrayAccess.
if mapped option is set to false i have to implement everything "by hand", and i'd like to let symfony do his job.
do you know what im doing wrong? could it be related to symfony 2.4 version?
thank you.