From 214f28d2e66fded07873c818da7a9ddc1f212302 Mon Sep 17 00:00:00 2001 From: ngodfraind Date: Mon, 8 Dec 2014 10:44:03 +0100 Subject: [PATCH] Dql: left join instead of join --- Repository/MessageRepository.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Repository/MessageRepository.php b/Repository/MessageRepository.php index 787b10e..6dfe09c 100644 --- a/Repository/MessageRepository.php +++ b/Repository/MessageRepository.php @@ -22,7 +22,7 @@ public function findBySubject(Subject $subject, $getQuery = false) $dql = " SELECT m, u, pws FROM Claroline\ForumBundle\Entity\Message m JOIN m.creator u - JOIN u.personalWorkspace pws + LEFT JOIN u.personalWorkspace pws JOIN m.subject subject WHERE subject.id = {$subject->getId()}"; @@ -79,4 +79,4 @@ public function findMessagesWithNoAuthor($executeQuery = true) return $executeQuery ? $query->getResult() : $query; } -} \ No newline at end of file +}