public function hasManyComponent($class, $component, $classOnly = true)
    {
        $hasMany = (array)Config::inst()->get($class, 'has_many');
        if (!isset($hasMany[$component])) {
            return null;
        }

        // Remove has_one specifier if given
        $hasMany = $hasMany[$component];
        $hasManyClass = strtok($hasMany, '.');

        // Validate
        $this->checkRelationClass($class, $component, $hasManyClass, 'has_many');
        return $classOnly ? $hasManyClass : $hasMany;
    }