summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-08-28 08:57:06 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-09-08 07:44:10 +0000
commitcc36cc3f3fd134a0726f2f74a50cc98afd454e98 (patch)
tree98da352b117835c92a7ab432a1bca098b8029791
parent1ed0a8caced114f5ddaea2eed02e37727cb58a95 (diff)
downloadnextcloud-server-cc36cc3f3fd134a0726f2f74a50cc98afd454e98.tar.gz
nextcloud-server-cc36cc3f3fd134a0726f2f74a50cc98afd454e98.zip
Don't use SELECT DISTINCT when to_char() is used in a WHERE statement
Nice bug in Oracle Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--apps/workflowengine/lib/Manager.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php
index 1fc30001518..5bb9704e291 100644
--- a/apps/workflowengine/lib/Manager.php
+++ b/apps/workflowengine/lib/Manager.php
@@ -147,10 +147,10 @@ class Manager implements IManager {
public function getAllConfiguredEvents() {
$query = $this->connection->getQueryBuilder();
- $query->selectDistinct('class')
- ->addSelect('entity', 'events')
+ $query->select('class', 'entity', $query->expr()->castColumn('events', IQueryBuilder::PARAM_STR))
->from('flow_operations')
- ->where($query->expr()->neq('events', $query->createNamedParameter('[]'), IQueryBuilder::PARAM_STR));
+ ->where($query->expr()->neq('events', $query->createNamedParameter('[]'), IQueryBuilder::PARAM_STR))
+ ->groupBy('class', 'entity', $query->expr()->castColumn('events', IQueryBuilder::PARAM_STR));
$result = $query->execute();
$operations = [];