Skip to content
Snippets Groups Projects
Unverified Commit 43efa408 authored by Arthur Schiwon's avatar Arthur Schiwon Committed by Roeland Jago Douma
Browse files

rejig right to left join for sqlite's satisfaction

parent 6caec491
No related branches found
No related tags found
No related merge requests found
...@@ -128,10 +128,10 @@ class DBConfigService { ...@@ -128,10 +128,10 @@ class DBConfigService {
$builder = $this->connection->getQueryBuilder(); $builder = $this->connection->getQueryBuilder();
$query = $builder->select(['a.mount_id', $builder->func()->count('a.mount_id', 'count')]) $query = $builder->select(['a.mount_id', $builder->func()->count('a.mount_id', 'count')])
->from('external_applicable', 'a') ->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( ->where($builder->expr()->andX(
$builder->expr()->eq('a.type', $builder->createNamedParameter($applicableType, IQueryBuilder::PARAM_INT)), $builder->expr()->eq('b.type', $builder->createNamedParameter($applicableType, IQueryBuilder::PARAM_INT)),
$builder->expr()->eq('a.value', $builder->createNamedParameter($applicableId)) $builder->expr()->eq('b.value', $builder->createNamedParameter($applicableId))
) )
) )
->groupBy(['a.mount_id']); ->groupBy(['a.mount_id']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment