EasyCorp / EasyAdminBundle

EasyAdmin is a fast, beautiful and modern admin generator for Symfony applications.
MIT License
4.08k stars 1.03k forks source link

Better Association/Collection support #4393

Open excitedbox opened 3 years ago

excitedbox commented 3 years ago

Since Associations and Collections play such a big role in data storage it would be great to have better support for them.

Adding an option to display a different entity field than the key without having to use the query builder, custom templates or writing crud controllers would make it much faster to configure crud forms.

Maybe something like AssociationField::new('key_field', 'label', 'query_options') ->setdisplayfield('display_field', options);

This would be another way to reduce repetition which almost every project needs anyway.

pkly commented 3 years ago

I too would like that, our views are really suffering because of this. It's likely I'll have to completely override the collection view because it's just unusable pretty much

excitedbox commented 3 years ago

yes, that seems to be the only real solution I have found tutorials for which seems like a big edit to make just to switch which field of a child entity is shown.

It looks like there is some option to do this already but there is no documentation for any of the relations and the reference section for the forms is still missing which seems like it would have a much higher priority.

I would be willing to write documentation, but I am already way behind on this project because even getting an answer to questions is difficult.