Skip to content

Commit

Permalink
fix: use proper cast instead of concat workaround
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Dec 20, 2024
1 parent 03ba84f commit 9e983d3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Folder/FolderManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ private function getGroupFolderRootId(int $rootStorageId): int {

private function joinQueryWithFileCache(IQueryBuilder $query, int $rootStorageId): void {
$query->leftJoin('f', 'filecache', 'c', $query->expr()->andX(
// concat with empty string to work around missing cast to string
$query->expr()->eq('c.name', $query->func()->concat('f.folder_id', $query->expr()->literal(''))),
$query->expr()->eq('c.name', $query->expr()->castColumn('f.folder_id', IQueryBuilder::PARAM_STR)),
$query->expr()->eq('c.parent', $query->createNamedParameter($this->getGroupFolderRootId($rootStorageId))),
$query->expr()->eq('c.storage', $query->createNamedParameter($rootStorageId)),
));
Expand Down

0 comments on commit 9e983d3

Please sign in to comment.