title: Doctrine ORM Conditional Association
body: <p>i'm building a Q&amp;A site and my questions, answers and comments are on the same <code>posts</code> table. But their <code>postType</code> is different. I can get answers for a question and comments for an answer with this association:</p>
  
  <pre><code>/**
   * @OneToMany(targetEntity="Cms\Entity\Post", mappedBy="parent")
   */
  private $answers;
  
  /**
   * @OneToMany(targetEntity="Cms\Entity\Post", mappedBy="parent")
   */
  private $comments;
  </code></pre>
  
  <p>But i think this is not the correct way to do this because if i fetch a question both answers and comments are filling with just answers. I have to set a condition for relation like <code>postType = 1</code></p>
  
  <p>How can i do this?</p>