title: doctrine2 - entity is member of
body: <p>for the sake of example:</p>
  
  <p>i have the following schema:</p>
  
  <pre><code>users(id, name)
  groups(id,name)
  user_groups(user_id, group_id)
  </code></pre>
  
  <p>i want to fetch users that belong to a certain group. problem is, i know the group id, so i don't want to join the groups table - user_groups is sufficient.</p>
  
  <p>the result should be</p>
  
  <pre><code>SELECT * FROM `users` AS u
  LEFT JOIN `user_groups` AS ug ON (ug.`user_id` = u.`id)
  WHERE ug.`group_id` = X
  // i know the value of X
  </code></pre>
  
  <p>my attempts in doctrine2 resulted in another join of the <code>groups</code> table.</p>
  
  <p>the closest thing i got is:</p>
  
  <pre><code>SELECT u FROM models\User u WHERE ?1 MEMBER OF u.groups
  </code></pre>
  
  <p>but it will also LEFT JOIN it inside the "WHERE EXISTS(...)"</p>
  
  <p>can this be done without native query (using DQL/query builder)?</p>