Use query builder in form CollectionType

2020-01-20 06:07发布

问题:

Is it possible to use a query builder or something else in my collectionType ?

回答1:

You have two options as explained in this doc after that you could use the entity_manager to extract your data from database and fill your collection.

Give it a try and hope it helps



回答2:

The solution was to change my getter in my entity to only have the data I wanted Thank you