a2lix / AutoFormBundle

Automate Symfony form building
https://a2lix.fr/bundles/auto-form
MIT License
83 stars 30 forks source link

Fixed configuring associations #10

Closed supersmile2009 closed 5 years ago

supersmile2009 commented 6 years ago

Changelog

### Fixed
- Fixed showing fields for *-to-One associations

Subject

Negation seems to be put in that if by mistake. It prevents form from showing fields for *-to-One associations. And when you define those fields, you get an exception "Field(s) ... doesn't exist in ClassName", because those are not considered valid fields by DoctrineORMManipulator.

webda2l commented 6 years ago

Thanks to contribute.

In the Demo use case, with https://github.com/a2lix/Demo/blob/master/app/src/Form/CompanyType.php#L45-L51 uncommented, the current behavior is the right behavior. However, in others uses case, it's not, you're right, so it will need some additional works. Feel free to work on it or I'll try myself soon.