vendredi 7 mars 2014

Handling multiple document upload in Doctrine 2 and Symfony 2


Vote count:

0




I'm following this tutorial about file upload with Symfony and Doctrine: http://ift.tt/1frXIzu


However, how this example would work with multiple Document entities in a form? I'm getting this error with multiple instances of the form type using that data class:



The form's view data is expected to be an instance of class Entity\Document, but is a(n) array. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms a(n) array to an instance of Entity\Document


asked 42 secs ago






Aucun commentaire:

Enregistrer un commentaire