protected function process($table, $metaModelName, $parentId, Request $request)
    {
        $this->knownAttributes = $this->fetchExisting($table, $parentId);

        $metaModel = $this->factory->getMetaModel($metaModelName);
        if (!$metaModel) {
            throw new \RuntimeException('Could not retrieve MetaModel ' . $metaModelName);
        }
        if ($request->request->has('add') || $request->request->has('saveNclose')) {
            $this->perform($table, $request, $metaModel, $parentId);
            // If we want to close, go back to referer.
            if ($request->request->has('saveNclose')) {
                return new RedirectResponse($this->getReferer($request, $table, false));
            }
        }

        return new Response($this->templating->render(
            'MetaModelsCoreBundle::Backend/add-all.html.twig',
            $this->render($table, $metaModel, $request)
        ));
    }