title: doctrine entity with foreign key to this entity
body: <p>I have a simple table for recursive categories:</p>
  
  <pre><code>id
  name
  parent_id - is a link to id, NULL - for root categories
  </code></pre>
  
  <p>I need to create a table with foreign key. My class doesn't create this key. How can I change this class to create table with foreign key using "doctrine:schema:create"? What I have tried:</p>
  
  <pre><code>&lt;?php
  namespace Test\BackEndBundle\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * @ORM\Entity
   * @ORM\Table(name="category")
   */
  class Category
  {
      /**
       * @ORM\Id
       * @ORM\Column(type="bigint", length=20)
       * @ORM\GeneratedValue(strategy="AUTO")
       * @var int
       */
      protected $id;
  
      /**
       * @ORM\Column(type="string", length="255")
       * @var string
       */
      protected $name;
  
      /**
       * @ORM\Column(name="parent_id", type="bigint", length=20, nullable="true")
       * @ORM\OneToMany(targetEntity="Category")
       * @ORM\JoinColumn(name="id", onDelete="CASCADE", onUpdate="CASCADE")
       * @var int
       */
      protected $parentId;
  
      /**
       * Get id
       *
       * @return int
       */
      public function getId()
      {
          return $this-&gt;id;
      }
  
      /**
       * Set name
       *
       * @param string $name
       */
      public function setName($name)
      {
          $this-&gt;name = $name;
      }
  
      /**
       * Get name
       *
       * @return string
       */
      public function getName()
      {
          return $this-&gt;name;
      }
  }
  </code></pre>