瀏覽代碼

Suggest using SortableRepository in the Sortable docs (Fixes #162)

Lukas Botsch 13 年之前
父節點
當前提交
c6bbd52041
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      doc/sortable.md

+ 4 - 1
doc/sortable.md

@@ -81,6 +81,9 @@ To attach the **Sortable Listener** to your event system:
 you need to identify entity as being Sortable. The metadata is loaded only once then
 cache is activated
 
+**Notice:** that you should register SortableRepository (or a subclass) as the repository in the Entity
+annotation to benefit from its query methods.
+
     namespace Entity;
     
     use Gedmo\Mapping\Annotation as Gedmo;
@@ -88,7 +91,7 @@ cache is activated
     
     /**
      * @ORM\Table(name="items")
-     * @ORM\Entity
+     * @ORM\Entity(repositoryClass="Gedmo\Sortable\Entity\Repository\SortableRepository")
      */
     class Item
     {