title: findBy with JOIN criteria in Symfony2
body: <p>I have 3 simple tables: user, role, user_x_role with Many-To-Many relation. I have 2 entities: User and Role. User entity has $userRoles property with relation annotation. In Controller I need to fetch all users with specific role. But I don't know how to use JOIN in controller. Current wrong code:</p>
  
  <pre><code>$role = $this-&gt;getDoctrine()-&gt;getRepository('TestBackEndBundle:Role');
  $roles = $role-&gt;findBy(array('name' =&gt; 'ROLE_PARTNER'));
  
  $user = $this-&gt;getDoctrine()-&gt;getRepository('TestBackEndBundle:User');
  $partners = $user-&gt;findBy(array('userRoles' =&gt; $roles));
  </code></pre>
  
  <p>It thows "Undefined index: joinColumns in ...". But I have joinColumns in User entity:</p>
  
  <pre><code>/**
   * @ORM\ManyToMany(targetEntity="Role")
   * @ORM\JoinTable(name="user_x_role",
   *     joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE", onUpdate="CASCADE")},
   *     inverseJoinColumns={@ORM\JoinColumn(name="role_id", referencedColumnName="id", onDelete="CASCADE", onUpdate="CASCADE")}
   * )
   * @var ArrayCollection
   */
  protected $userRoles;
  </code></pre>