From f743afd1ae1b3e4cf53111d971afdda4eddcd73e Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 4 Dec 2019 15:59:02 +0100 Subject: [PATCH] Host: Join comments with a LEFT join --- 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 3103f9d0..3796f58b 100644 --- a/library/Icingadb/Model/Host.php +++ b/library/Icingadb/Model/Host.php @@ -113,7 +113,7 @@ class Host extends Model ->through(HostgroupMember::class); $relations->hasOne('state', HostState::class)->setJoinType('LEFT'); - $relations->hasMany('comment', Comment::class); + $relations->hasMany('comment', Comment::class)->setJoinType('LEFT'); $relations->hasMany('downtime', Downtime::class); $relations->hasMany('history', History::class); $relations->hasMany('notification', Notification::class);