Doctrine QueryBuilder delete with joins

后端 未结 4 1228
渐次进展
渐次进展 2020-12-07 00:48

I\'m trying to use the Doctrine QueryBuilder to perform the following SQL query:

DELETE php FROM product_hole_pattern php
INNER JOIN hole_pattern hp ON php.h         


        
4条回答
  •  生来不讨喜
    2020-12-07 01:13

    On Symfony2 please try:

    foreach ($results as $result) {
      $em->remove($result);
    }
    
    $em->flush();
    

    Thats all.

提交回复
热议问题