0

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

配置.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.     
4

1 回答 1

1

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

您可以在文档中阅读有关它的更多信息。

于 2018-06-12T03:42:52.177 回答