【问题标题】:The annotation "@Gedmo\Mapping\Annotation\Sortable does not exist, or could not be auto-loaded注释“@Gedmo\Mapping\Annotation\Sortable 不存在,或无法自动加载
【发布时间】:2018-06-11 18:38:00
【问题描述】:

我使用“stof/doctrine-extensions-bundle”:“v1.3.0”,

config.yml

stof_doctrine_extensions:
    default_locale: %locale%
    orm:
        default:
            tree: ~
            timestampable: ~
            sortable: ~
            sluggable: ~
            #translatable:   ~

实体

使用 Gedmo\Mapping\Annotation 作为 Gedmo;

/**

 * @Gedmo\Sortable()
 * @ORM\Column(name="position", type="integer")
 * @var integer
 */
protected $position;

php bin/console 原则:schema:update --dump-sql

给我

In AnnotationException.php line 54:

  [Semantical Error] The annotation "@Gedmo\Mapping\Annotation\Sortable" in property Mea\TaskBundle\Entity\Task::$position does not exist,  
   or could not be auto-loaded.     

【问题讨论】:

    标签: symfony doctrine stofdoctrineextensions


    【解决方案1】:

    那个类不存在。我相信您正在寻找的是SortablePositionSortableGroup

    您可以在documentation 中阅读更多相关信息。

    【讨论】:

      猜你喜欢
      • 2017-03-06
      • 1970-01-01
      • 1970-01-01
      • 2013-05-29
      • 1970-01-01
      • 1970-01-01
      • 2018-05-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多