CommentQuery: Fix grouping

There was only one comment for each host or service being fetched.

refs #9009
This commit is contained in:
Johannes Meyer 2015-06-08 18:01:16 +02:00
parent 83c21f08e3
commit a4ad4e2372
2 changed files with 4 additions and 4 deletions

View File

@ -101,7 +101,7 @@ class HostcommentQuery extends IdoQuery
'hgo.objecttype_id = ?',
3
);
$this->group('ho.name1');
$this->group(array('c.comment_id', 'ho.name1'));
}
/**
@ -177,6 +177,6 @@ class HostcommentQuery extends IdoQuery
'so.objecttype_id = ?',
2
);
$this->group('ho.name1');
$this->group(array('c.comment_id', 'ho.name1'));
}
}

View File

@ -106,7 +106,7 @@ class ServicecommentQuery extends IdoQuery
'hgo.objecttype_id = ?',
3
);
$this->group(array('so.name2', 'so.name1'));
$this->group(array('c.comment_id', 'so.name2', 'so.name1'));
}
/**
@ -160,7 +160,7 @@ class ServicecommentQuery extends IdoQuery
'sgo.objecttype_id = ?',
4
);
$this->group(array('so.name2', 'so.name1'));
$this->group(array('c.comment_id', 'so.name2', 'so.name1'));
}
/**