Skip to content

Commit 9e983d3

Browse files
committed
fix: use proper cast instead of concat workaround
Signed-off-by: Robin Appelman <[email protected]>
1 parent 03ba84f commit 9e983d3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/Folder/FolderManager.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,7 @@ private function getGroupFolderRootId(int $rootStorageId): int {
121121

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

0 commit comments

Comments
 (0)