小编mal*_*lar的帖子

getRepository原则中不存在类

我是学说和交响乐的新手.我使用doctrine ORM创建了一个带有curd操作的小应用程序.我的插入操作的工作,但我的列表操作抛出一个错误

[Doctrine\Common\Persistence\Mapping\MappingException]
类'Tab'不存在

我将在此处粘贴我的代码: 我的模型文件:/var/www/html/silexapp/app/Tnq/Todo/Model/Tab.php

    <?php
   namespace Tnq\Todo\Model;
  // app/Tnq/Todo/Model/Tab.php
  /**
  * @Entity(repositoryClass="Repository_TabRepository")    
  @Table(name="tab")
  */
  class Tab
 {
/** @TAB_ID 
 * @Id @Column(type="integer") @GeneratedValue
 * @var int
 */
protected $id;
/**
 * @Column(type="string")
 * @var string
 */
protected $description;
/**
 * @Column(type="string")
 * @var string
 */
protected $tabname;

public function getId()
{
    return $this->id;
}

public function getDescription()
{
    return $this->description;
}

public function setDescription($description)
{
    $this->description = $description;
}

public function setTabname($tabname)
{
    $this->tabname = $tabname; …
Run Code Online (Sandbox Code Playgroud)

php doctrine symfony doctrine-orm

2
推荐指数
1
解决办法
3970
查看次数

标签 统计

doctrine ×1

doctrine-orm ×1

php ×1

symfony ×1