Is there a way to filter the entities collected by Symfony2 in a form collection?
My scenario is this;
2 entities: parent and child. The child entity has a property 'birthdate'. There is a manyToMany relationship between the 2 tables.
I have a formType (parentType) that contains a collection of childType forms.
I can load parentType and it loads every childType that is associated to the parent record.
I want to filter the childType collection so that records with a birthdate greater than a date are included and those less than the date are excluded.
The Symfony2 collection form type does not allow the use of 'query_builder' to filter the selection in builder->add().
Has anyone faced or solved this problem?