3 namespace Drupal\workspaces\EntityQuery;
5 use Drupal\Core\Entity\Query\Sql\QueryAggregate as BaseQueryAggregate;
8 * Alters aggregate entity queries to use a workspace revision if possible.
10 class QueryAggregate extends BaseQueryAggregate {
13 prepare as traitPrepare;
19 public function prepare() {
20 // Aggregate entity queries do not return an array of entity IDs keyed by
21 // revision IDs, they only return the values of the aggregated fields, so we
22 // don't need to add any expressions like we do in
23 // \Drupal\workspaces\EntityQuery\Query::prepare().
24 $this->traitPrepare();
26 // Throw away the ID fields.
27 $this->sqlFields = [];