title: Two attributes sharing the same OneToMany relationship to one entity Symfony2
body: <p>Let's first describe my situation. I am using Symfony2 and I have a problem with a relationship between my entities.</p>
  
  <p>I have two entities that are linked together. The two entities are <code>AssociationQuestion</code> and <code>AssociationPossibleAnswer</code>. I am currently creating a questionary software where one would have to link one possible answer on the left to another one possible answer on the right, such as in the following example:</p>
  
  <p><img src="https://i.stack.imgur.com/mXq8g.png" alt=""></p>
  
  <p>Currently, I'm planning on having two attributes that are arrays in class <code>AssociationQuestion</code> that would hold many <code>AssociationPossibleAnswer</code> objects. The first array would contain the possible answers on the left and the second one would contain the possible answers on the right.</p>
  
  <p>Therefore, to me, it looks like I would have two oneToMany relations in <code>AssociationQuestion</code></p>
  
  <pre><code>AssociationQuestion:
  
      oneToMany:
          possibleAnswersLeft:
              targetEntity: AssociationPossibleAnswer
              mappedBy: associationQuestion
  
          possibleAnswersRight:
              targetEntity: AssociationPossibleAnswer
              mappedBy: associationQuestion
  </code></pre>
  
  <p>Then, in <code>AssociationPossibleAnswer</code>, I would have one ManyToOne relation :</p>
  
  <pre><code>AssociationPossibleAnswer:
      manyToOne:
          associationQuestion:
              targetEntity: AssociationQuestion
  </code></pre>
  
  <p>The problem is that I get the following error trying to validate my doctrine. It seems that you can't have two entities linked to one as I would wish to do...</p>
  
  <pre><code>* The field AssociationQuestion#possibleAnswersLeft is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity AssociationPossibleAnswer#associationQuestion does not contain the required 'inversedBy=possibleAnswersLeft' attribute.
  
  * The field AssociationQuestion#possibleAnswersRight is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity AssociationPossibleAnswer#associationQuestion does not contain the required 'inversedBy=possibleAnswersRight' attribute.
  </code></pre>
  
  <p>I'm wondering if this is the proper way to set my relation between my two entities. <strong>Is it possible to have two attributes pointing to an entity while in return the entity does not know which attribute it is being pointed from.</strong></p>