protected function getRelatedAggregatesFromHashes(array $hashes, string $relation): array
    {
        $related = [];

        foreach ($hashes as $hash) {
            $aggregate = $this->getRelatedAggregateFromHash($hash, $relation);

            if ($aggregate) {
                $related[] = $aggregate;
            }
        }

        return $related;
    }