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 committed Sep 7, 2020
1 parent 16e1d1c commit a8bd209
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', 'events')
->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', 'events');

$result = $query->execute();
$operations = [];
Expand Down

0 comments on commit a8bd209

Please sign in to comment.