private function buildComplexIndexMenu($modelName, $modelId, ModelConfig $config = null) {
        $model = $this->aujaConfigurator->getModel($modelName);
        $relations = $this->aujaConfigurator->getRelationsForModel($model);

        $associationRelations = array();
        foreach ($relations as $relation) {
            if ($relation->getType() == Relation::HAS_MANY || $relation->getType() == Relation::HAS_AND_BELONGS_TO) { // TODO: What to do with one-to-one relations?
                $associationRelations[] = $relation;
            }
        }

        switch (count($associationRelations)) {
            case 0:
                $menu = $this->noAssociationsMenuFor($modelName, $config);
                break;
            case 1:
                $menu = $this->singleAssociationMenuFor($modelName, $modelId, $associationRelations[0], $config);
                break;
            default:
                $menu = $this->multipleAssociationsMenuFor($modelName, $modelId, $associationRelations, $config);
                break;
        }

        return $menu;
    }