How do you define the getter to use in a CRUD form besides defining __toString()?
问题 If you've used Symfony2's generators to create CRUD forms from database entities, you may wind with an error like this on the "create new record" screen: StringCastException: A "__toString()" method was not found on the objects of type "ScrumBoard\ServiceBundle\Entity\Users" passed to the choice field. To read a custom getter instead, set the option "property" to the desired property path. If I'm reading this correctly, the problem is that it needs to display a dropdown list of users for the