Hi everybody. I realize that in PR6 there is no Symfony\Bundle\DoctrineBundle\Form\ package-namespace So it is impossible to me to bind Forms to Entities and flush them into the database.
According to Docs, you should use EntityToIDTransformer, CollectionToChoiceTransformer, or so, to be able to bind Objects to Fields and viceversa. I have 2 entities Clients and Sales. So for my Sales, I have an attribute named "client". is a one-to-Many relation. I have to pass a Client object to the "setClient(Client $client) { } " function in Sales entity. With the lack of the DoctrineBundle\Form I've create a simple ChoiceField which contains a simple array of ID => 'descriptiveStringTextForAnEntity' I wanted to capture the value of the choice (to do a query to the entity_manager and get the corresponing object from the db and pass it to my Entity), but $this->get('request')->get('nameOfMyForm[nameOftheChoiceField]') is returning nothing. I want to do that query to the db cuase the ChoiceForm is returning a string (corresponding to the selected value) and the $form->bind($this->get('request), $SalesEntityInstance) is telling me that a string value has been passed but a Client object is expected. What can I to to solve this problem? Should I wait for a PR7 with the issues fixed for the DoctrineBundle\Form? Any suggestion will be welcome [?] (sorry for my english :D) -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
<<330.gif>>