Skip to content

Commit 4f9d123

Browse files
tchapitchapi
andauthored
Fix left join in public function findAllSchedulingObjectsForCalendar (#261)
Co-authored-by: tchapi <regbasket@gmail.com>
1 parent 054a7f8 commit 4f9d123

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Repository/CalendarInstanceRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public function findAllSchedulingObjectsForCalendar(int $calendarInstanceId, str
8282
{
8383
$objectRepository = $this->getEntityManager()->getRepository(SchedulingObject::class);
8484
return $objectRepository->createQueryBuilder('s')
85-
->leftJoin(CalendarObject::class, 'c', \Doctrine\ORM\Query\Expr\Join::WITH, 'c.uri = s.uri')
86-
->leftJoin(CalendarInstance::class, 'ci', \Doctrine\ORM\Query\Expr\Join::WITH, 'ci.calendar = c.calendar')
85+
->innerJoin(CalendarObject::class, 'c', \Doctrine\ORM\Query\Expr\Join::WITH, 'c.uri = s.uri')
86+
->innerJoin(CalendarInstance::class, 'ci', \Doctrine\ORM\Query\Expr\Join::WITH, 'ci.calendar = c.calendar')
8787
->where('ci.id = :id')
8888
// uri is not unique across calendars — two different calendars can have objects with the same uri.
8989
// The join should also filter by principaluri as a consequence

0 commit comments

Comments
 (0)