Skip to content

Commit

Permalink
Don't use SELECT DISTINCT when to_char() is used in a WHERE statement
Browse files Browse the repository at this point in the history
Nice bug in Oracle

Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen authored and backportbot[bot] committed Sep 8, 2020
1 parent 1ed0a8c commit cc36cc3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/workflowengine/lib/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ public function getRuleMatcher(): IRuleMatcher {
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 = [];
Expand Down

0 comments on commit cc36cc3

Please sign in to comment.