protected function getKeysFromResults(array $results, $key = null)
    {
        if (is_null($key)) {
            $key = $this->parentMap->getKeyName();
        }

        return array_unique(array_values(array_map(function ($value) use ($key) {
            return $value[$key];
        }, $results)));
    }