소스 검색

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
 you need to identify entity as being Sortable. The metadata is loaded only once then
 cache is activated
 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;
     namespace Entity;
     
     
     use Gedmo\Mapping\Annotation as Gedmo;
     use Gedmo\Mapping\Annotation as Gedmo;
@@ -88,7 +91,7 @@ cache is activated
     
     
     /**
     /**
      * @ORM\Table(name="items")
      * @ORM\Table(name="items")
-     * @ORM\Entity
+     * @ORM\Entity(repositoryClass="Gedmo\Sortable\Entity\Repository\SortableRepository")
      */
      */
     class Item
     class Item
     {
     {