2016-02-25 2 views
-1

[Доктрина \ Common \ Постоянство \ Mapping \ MappingException]Ошибка при попытке обновить: Схема

Класс 'Cunningsoft \ ChatBundle \ Entity \ AuthorInterface' не существует.

Эта ошибка возникает, когда я вставляю (новый Cunningsoft \ ChatBundle \ CunningsoftChatBundle(),) в AppKernel.php и после того, как утилиты (AuthorInterface) в моей сущности не могут обновиться: схема с этой ошибкой. enter image description here

<?php 
//AppKernel.php 
use Symfony\Component\HttpKernel\Kernel; 
use Symfony\Component\Config\Loader\LoaderInterface; 

class AppKernel extends Kernel 
{ 
    public function registerBundles() 
    { 
     $bundles = array(
      new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), 
      new Symfony\Bundle\SecurityBundle\SecurityBundle(), 
      new Symfony\Bundle\TwigBundle\TwigBundle(), 
      new Symfony\Bundle\MonologBundle\MonologBundle(), 
      new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), 
      new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), 
      new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(), 
      new AppBundle\AppBundle(), 
      new helloBundle\helloBundle(), 
      new RegBundle\RegBundle(), 
      new IndexBundle\IndexBundle(), 
      new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(), 
      new Cunningsoft\ChatBundle\CunningsoftChatBundle(), 
      new Knp\Bundle\TimeBundle\KnpTimeBundle(), 
     ); 

     if (in_array($this->getEnvironment(), array('dev', 'test'), true)) { 
      $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); 
      $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); 
      $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); 
      $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); 
     } 

     return $bundles; 
    } 

    public function registerContainerConfiguration(LoaderInterface $loader) 
    { 
     $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); 
    } 
} 
+1

показать нам свою сущность и класс 'AuthorInterface'. –

+0

Создает ли ваша организация AuthorInterface? –

ответ

0

вы должны отобразить интерфейс для объекта пользователя

// app/config/config.yml 
// ... 
doctrine: 
    orm: 
     resolve_target_entities: 
      Cunningsoft\ChatBundle\Entity\AuthorInterface: Acme\ProjectBundle\Entity\User 
+0

я сделать это и получить ту же ошибку –

+0

учение: ОРМ: resolve_target_entities: Cunningsoft \ Bundle \ ChatBundle \ Entity \ AuthorInterface: RegBundle \ Entity \ Имя пользователя // полностью или прямо –

Смежные вопросы