注释" @Gedmo \ Mapping \ Annotation \ Sortable不存在,或者无法自动加载

时间:2018-06-11 18:38:01

标签: symfony doctrine stofdoctrineextensions

我使用" 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 doctrine: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.     

1 个答案:

答案 0 :(得分:0)

该课程不存在。我相信您要找的是SortablePositionSortableGroup

您可以在documentation中了解更多相关信息。