Doctrine的getResult()永远不会返回,也不会抛出任何错误或异常

时间:2013-08-01 15:18:19

标签: doctrine-orm

我有两个查询,我一个接一个地执行。它们非常相似,但第一个起作用而不是第二个起作用。实际上,第二个永远不会返回,也不会抛出任何错误或异常。以下是相关代码:

$deleteChercheurProjetsQuery = $em->createQuery("DELETE FROM Entities\\ChercheurProjetRech P WHERE P.ProjetRechercheID IN (:existingProjetRechercheIds)")
    ->setParameter('existingProjetRechercheIds', $existingProjetRechercheIds, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY);

$deleteProjetsQuery = $em->createQuery("DELETE FROM Entities\\ProjetRecherche P WHERE P.ID IN (:existingProjetRechercheIds)")
    ->setParameter('existingProjetRechercheIds', $existingProjetRechercheIds, \Doctrine\DBAL\Connection::PARAM_INT_ARRAY);

error_log("This message is logged");
$deleteChercheurProjetsQuery->getResult();
error_log("This message is also logged");
$deleteProjetsQuery->getResult();
error_log("This message is NOT logged");

我怎样才能找出问题所在?

1 个答案:

答案 0 :(得分:0)

好的,问题出在其他地方。我将有问题的行包装在try块中,并发现当时php的内存不足。

相关问题