title: Doctrine 2 delete with query builder
body: <p>I have two Entities with relation OneToMany, <code>Project</code> and <code>Services</code>. Now i want to remove all the services by project_id.</p>
  
  <p>First attempt:</p>
  
  <pre><code>$qb = $em-&gt;createQueryBuilder();
  $qb-&gt;delete('Services','s');
  $qb-&gt;andWhere($qb-&gt;expr()-&gt;eq('s.project_id', ':id'));
  $qb-&gt;setParameter(':id',$project-&gt;getId());
  </code></pre>
  
  <p>This attempt fails with the Exception <code>Entity Service does not have property project_id</code>. And it's true, that property does not exists, it's only in database table as foreign key.</p>
  
  <p>Second attempt:</p>
  
  <pre><code>$qb = $em-&gt;createQueryBuilder();
  $qb-&gt;delete('Services','s')-&gt;innerJoin('s.project','p');
  $qb-&gt;andWhere($qb-&gt;expr()-&gt;eq('p.id', ':id'));
  $qb-&gt;setParameter(':id',$project-&gt;getId());
  </code></pre>
  
  <p>This one generetate a non valid DQL query too.</p>
  
  <p>Any ideas and examples will be welcome.</p>