I have 3 entities:
[Member] ----OneToMany----> [MemberCategory] ---ManyToOne---> [Category]
This works well as far as fetching results fr
You will need to use the querybuilder inside your form
$builder->add('categories', 'entity', array(
'class' => 'SMWMemberBundle:MemberCategory',
'property' => 'category.categoryName',
'query_builder' => function(EntityRepository $er ) use ( ? ) {
return $er->createQueryBuilder( ? )
// your query with a left join probably
}
'multiple' => true,
'expanded' => true,
'required' => false
));
See documentation for proper use. see symfony2 form querybuilder with parameters for an exmple