From 8f5e7aebf451a6b981b95dd22a22310076df0237 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Mon, 16 Dec 2019 10:43:39 +0100 Subject: [PATCH] Host: Use LEFT JOIN for downtimes --- library/Icingadb/Model/Host.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icingadb/Model/Host.php b/library/Icingadb/Model/Host.php index 37f7858d..50692d5c 100644 --- a/library/Icingadb/Model/Host.php +++ b/library/Icingadb/Model/Host.php @@ -118,7 +118,7 @@ class Host extends Model $relations->hasOne('state', HostState::class)->setJoinType('LEFT'); $relations->hasMany('comment', Comment::class)->setJoinType('LEFT'); - $relations->hasMany('downtime', Downtime::class); + $relations->hasMany('downtime', Downtime::class)->setJoinType('LEFT'); $relations->hasMany('history', History::class); $relations->hasMany('notification', Notification::class); $relations->hasMany('notification_history', NotificationHistory::class);