Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Don't include unindexed is_backup in the query, it's ensured by the u…
…ser_id leading underscore already

Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Feb 15, 2022
commit 7309e979071565da592819991c9d9deb3134a70d
3 changes: 1 addition & 2 deletions apps/user_status/lib/Db/UserStatusMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ public function findByUserId(string $userId, bool $isBackup = false):UserStatus
$qb
->select('*')
->from($this->tableName)
->where($qb->expr()->eq('user_id', $qb->createNamedParameter($isBackup ? '_' . $userId : $userId, IQueryBuilder::PARAM_STR)))
->andWhere($qb->expr()->eq('is_backup', $qb->createNamedParameter($isBackup, IQueryBuilder::PARAM_BOOL)));
->where($qb->expr()->eq('user_id', $qb->createNamedParameter($isBackup ? '_' . $userId : $userId, IQueryBuilder::PARAM_STR)));

return $this->findEntity($qb);
}
Expand Down