From bd30d97857fab2ee8a7366c046b74f594c8c5451 Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Mon, 16 Aug 2021 14:28:09 +0200 Subject: Set alias for result of cast column function On OCI an expression like to_char(events) end up as $row['to_char(events)'] in the query result. Signed-off-by: Daniel Kesselberg --- apps/workflowengine/lib/Manager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/workflowengine/lib/Manager.php b/apps/workflowengine/lib/Manager.php index d0eee80ca37..178bc87365b 100644 --- a/apps/workflowengine/lib/Manager.php +++ b/apps/workflowengine/lib/Manager.php @@ -155,7 +155,8 @@ class Manager implements IManager { public function getAllConfiguredEvents() { $query = $this->connection->getQueryBuilder(); - $query->select('class', 'entity', $query->expr()->castColumn('events', IQueryBuilder::PARAM_STR)) + $query->select('class', 'entity') + ->selectAlias($query->expr()->castColumn('events', IQueryBuilder::PARAM_STR), 'events') ->from('flow_operations') ->where($query->expr()->neq('events', $query->createNamedParameter('[]'), IQueryBuilder::PARAM_STR)) ->groupBy('class', 'entity', $query->expr()->castColumn('events', IQueryBuilder::PARAM_STR)); -- cgit v1.2.3