protected function addMissingParentRelations(array $relations)
    {

        $filled = $relations;

        foreach ($relations as $relation) {

            $segments = explode('.', $relation);
            $path = [];
            foreach ($segments as $segment) {
                $path[] = $segment;
                $pathString = implode('.', $path);
                if (!in_array($pathString, $relations)) {
                    $filled[] = $pathString;
                }
            }
        }

        return $filled;

    }