title: DoctrineExtensions - Tree object class: MyBundle\Entity\Category must have tree metadata at this point
body: <p>I want to use the tree feature of DoctrineExtensions for my Symfony2 application.</p>
  
  <p>But I get this error :</p>
  
  <pre><code>Tree object class: MyBundle\Entity\Category must have tree metadata at this point.
  </code></pre>
  
  <p>Symfony : v2.5.3</p>
  
  <p>Doctrine Common : v2.4.2</p>
  
  <p>DoctrineExtensions : Master</p>
  
  <pre><code>&lt;?php
  
  namespace MyBundle\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  use Gedmo\Mapping\Annotation as Gedmo;
  
  /**
   * Category
   * @Gedmo\Tree(type="nested")
   * @ORM\Table(name="category", uniqueConstraints={@ORM\UniqueConstraint(name="id", columns={"id"})})
   * use repository for handy tree functions
   * @ORM\Entity(repositoryClass="Gedmo\Tree\Entity\Repository\NestedTreeRepository")
   */
  class Category
  {
      /**
       * @ORM\Column(name="id", type="integer")
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="IDENTITY")
       */
      private $id;
  
       /**
       * @Gedmo\TreeLeft
       * @ORM\Column(name="lft", type="integer")
       */
      private $lft;
  
      /**
       * @Gedmo\TreeLevel
       * @ORM\Column(name="lvl", type="integer")
       */
      private $lvl;
  
       /**
       * @Gedmo\TreeRight
       * @ORM\Column(name="rgt", type="integer")
       */
      private $rght;
  
      /**
       * @Gedmo\TreeRoot
       * @ORM\Column(name="root", type="integer", nullable=true)
       */
      private $root;
  
       /**
       * @Gedmo\TreeParent
       * @ORM\ManyToOne(targetEntity="Category", inversedBy="children")
       * @ORM\JoinColumn(name="parentId", referencedColumnName="id", onDelete="CASCADE")
       */
      private $parentid;
  
      /**
       * @ORM\OneToMany(targetEntity="Category", mappedBy="parentid")
       * @ORM\OrderBy({"lft" = "ASC"})
       */
      private $children;
  </code></pre>
  
  <p>I followed <a href="https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/symfony2.md" rel="nofollow">this document</a> to Install Gedmo Doctrine2 extensions in Symfony2, but it seems something is wrong.</p>