title: Many-to-many self relation with extra fields?
body: <p>I am trying to develop a friends system, and I need a Many-To-Many relation on my User entities ; for now, this is what I've done : </p>
  
  <pre><code>/**
   * @ORM\ManyToMany(targetEntity="User", mappedBy="friends")
   */
  protected $friendsWith;
  
  /**
   * @ORM\ManyToMany(targetEntity="User", inversedBy="friendsWith")
   * @JoinTable(name="friends",
   *            joinColumns={@JoinColumn(name="user_id", referencedColumnName="id")},
   *            inverseJoinColumns={@JoinColumn(name="friend_user_id", referencedColumnName="id")}
   *           )
   */
  protected $friends;
  </code></pre>
  
  <p>But I would like to have some extra fields for these relations, for example the creation date or the state (accepted, pending, ...) ; I've created another entity "Friend", and I would like this entity to be used as a link between friends. But I don't really know how to manage this...</p>
  
  <p>Do you have some ideas ?</p>
  
  <p>Thanks !</p>