How can I get a query from the entity or generated at the moment within a form field.
I have two entities EquipoPv and CatEquipoPv where CatEquipoPv has a relationship of OneToMany with EquipoPv
and trying to generate the query in the following way to obtain the fields of this query within the test field at the time of rendering.
//EquipoPvType.php
....codigo....
->add('test', EntityType::class, array(
"class" => "PvsBundle:EquipoPv",
"choice_label" => 'catalogo',
"query_builder"=>function (\PvsBundle\Entity\CatEquipoPv $er){
return $er->createQueryBuilder('dt');
}
));
but I get this error: