diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Select.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Select.php index 08bfa90..2a931ec 100644 --- a/core/lib/Drupal/Core/Database/Driver/pgsql/Select.php +++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Select.php @@ -55,7 +55,7 @@ public function orderBy($field, $direction = 'ASC') { // Call parent function to order on this. $return = parent::orderBy($field, $direction); - if ($this->hasTag('pgsql_no_addfield_on_orderby')) { + if ($this->hasTag('entity_query')) { return $return; } diff --git a/core/lib/Drupal/Core/Entity/Query/Sql/Query.php b/core/lib/Drupal/Core/Entity/Query/Sql/Query.php index e7179c4..f5c84b4 100644 --- a/core/lib/Drupal/Core/Entity/Query/Sql/Query.php +++ b/core/lib/Drupal/Core/Entity/Query/Sql/Query.php @@ -206,7 +206,6 @@ protected function addSort() { } // Now we know whether this is a simple query or not, actually do the // sorting. - $this->sqlQuery->addTag('pgsql_no_addfield_on_orderby'); foreach ($sort as $key => $sql_alias) { $direction = $this->sort[$key]['direction']; if ($simple_query || isset($this->sqlGroupBy[$sql_alias])) {