diff options
author | Joas Schilling <coding@schilljs.com> | 2020-08-28 08:57:06 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-09-08 07:42:12 +0000 |
commit | 30db37bbf2d897572f8dbbabc2e4aca96b760818 (patch) | |
tree | 9418c55ebcf0022810e623258359657ce33bed80 /apps/workflowengine | |
parent | c3a6f50206f667e33eb4c6d222d190308303f41b (diff) | |
download | nextcloud-server-30db37bbf2d897572f8dbbabc2e4aca96b760818.tar.gz nextcloud-server-30db37bbf2d897572f8dbbabc2e4aca96b760818.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>
Diffstat (limited to 'apps/workflowengine')
-rw-r--r-- | apps/workflowengine/lib/Manager.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php index b583b190070..fefeb9230e6 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 = []; |