title: Doctrine Self-referencing Association Mapping (Symfony)
body: <p>I want to create a FAQ System, where the admin is able to create another FAQ in the FAQ a SubFAQ in the FAQ and so on..</p>
  
  <p>I know that I need to self-reference, but how could I solve this?</p>
  
  <p>My Entity FAQ.php looks like this:</p>
  
  <pre><code> /**
    * @OneToMany(targetEntity="Faq", mappedBy="parent")
    */
   private $children;
  
   /**
    * @ManyToOne(targetEntity="Faq", inversedBy="children")
   * @JoinColumn(name="parent_id", referencedColumnName="id")
    */
   private $parent;
  
   public function __construct() {
     $this-&gt;children = new \Doctrine\Common\Collections\ArrayCollection();
   }
  </code></pre>
  
  <p>What I don't understand is the inversedBy and how to use all this.</p>
  
  <p>Thank you.</p>