public function getMetaModel(EnvironmentInterface $interface)
    {
        $metaModelId = $this->connection->createQueryBuilder()
            ->select('d.pid')
            ->from('tl_metamodel_dca', 'd')
            ->leftJoin('d', 'tl_metamodel_dcasetting', 's', '(d.id=s.pid)')
            ->where('(s.id=:id)')
            ->setParameter('id', ModelId::fromSerialized($interface->getInputProvider()->getParameter('pid'))->getId())
            ->execute();

        if ($tableName = $this->factory->translateIdToMetaModelName($metaModelId = $metaModelId->fetchColumn())) {
            return $this->factory->getMetaModel($tableName);
        }

        throw new \RuntimeException('Could not retrieve MetaModel ' . $metaModelId);
    }