From 27ffd89076325e4c4da9911b218a05b74703f7cf Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Thu, 5 Dec 2019 14:43:58 +0100 Subject: [PATCH] rejig right to left join for sqlite's satisfaction Signed-off-by: Arthur Schiwon --- apps/files_external/lib/Service/DBConfigService.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files_external/lib/Service/DBConfigService.php b/apps/files_external/lib/Service/DBConfigService.php index 9394924d39..2fc23af916 100644 --- a/apps/files_external/lib/Service/DBConfigService.php +++ b/apps/files_external/lib/Service/DBConfigService.php @@ -126,10 +126,10 @@ class DBConfigService { $builder = $this->connection->getQueryBuilder(); $query = $builder->select(['a.mount_id', $builder->func()->count('a.mount_id', 'count')]) ->from('external_applicable', 'a') - ->rightJoin('a', 'external_applicable', 'b', $builder->expr()->eq('a.mount_id', 'b.mount_id')) + ->leftJoin('a', 'external_applicable', 'b', $builder->expr()->eq('a.mount_id', 'b.mount_id')) ->where($builder->expr()->andX( - $builder->expr()->eq('a.type', $builder->createNamedParameter($applicableType, IQueryBuilder::PARAM_INT)), - $builder->expr()->eq('a.value', $builder->createNamedParameter($applicableId)) + $builder->expr()->eq('b.type', $builder->createNamedParameter($applicableType, IQueryBuilder::PARAM_INT)), + $builder->expr()->eq('b.value', $builder->createNamedParameter($applicableId)) ) ) ->groupBy(['a.mount_id']);