Merge pull request #28452 from nextcloud/bug/noid/column-name-oci

Set alias for result of cast column function
pull/28540/head
Julius Härtl 2021-08-20 15:37:46 +07:00 committed by GitHub
commit 98e2dce3a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

@ -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));