protected function getSelectedForAllAliases(array $aliases)
    {
        if (empty($aliases)) {
            $selected = $this->mergeOrderByAttributes($this->getSelectedQueryAttributes($this->operation->getAttributes()));
        } else {
            // If there are aliases, then we need to loop through each one to determine was was actually selected for each.
            $selected = [];
            foreach ($aliases as $alias => $schema) {
                $selected = array_replace(
                    $selected,
                    $this->mergeOrderByAttributes($this->getSelectedQueryAttributes($this->operation->getAttributes(), $schema), $alias)
                );
            }
        }

        return $selected;
    }