Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
The objectid is a string
This allows the query to use the index. Else it has to resort on
scanning all the rows.

Signed-off-by: Roeland Jago Douma <[email protected]>
  • Loading branch information
rullzer authored and backportbot[bot] committed Jan 29, 2021
commit 6fa08f38b3ff1457ae936387fcd13a079f5ef0f0
2 changes: 1 addition & 1 deletion lib/private/SystemTag/SystemTagObjectMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public function getTagIdsForObjects($objIds, string $objectType): array {
->from(self::RELATION_TABLE)
->where($query->expr()->in('objectid', $query->createParameter('objectids')))
->andWhere($query->expr()->eq('objecttype', $query->createParameter('objecttype')))
->setParameter('objectids', $objIds, IQueryBuilder::PARAM_INT_ARRAY)
->setParameter('objectids', $objIds, IQueryBuilder::PARAM_STR_ARRAY)
->setParameter('objecttype', $objectType)
->addOrderBy('objectid', 'ASC')
->addOrderBy('systemtagid', 'ASC');
Expand Down