public function getAggregationTags(EntityDefinition $definition, Criteria $criteria, Aggregation $aggregation): array
    {
        $tags = [$definition->getEntityName() . '.id'];

        $fields = $criteria->getAggregationQueryFields();
        $fields = array_merge($fields, $aggregation->getFields());

        foreach ($fields as $accessor) {
            foreach ($this->getFieldsOfAccessor($definition, $accessor) as $association) {
                $tags[] = $association;
            }
        }

        return $tags;
    }