title: Unidirectional many-to-many behavior and needed entities in Doctrine/Symfony 2
body: <p>So, i have the following structure of entities: </p>
  
  <pre><code>/**
   * @ORM\Entity
   */
  class Group
  {
    /**
     * Many-To-Many, Unidirectional
     *
     * @var ArrayCollection $permissions
     *
     * @ORM\ManyToMany(targetEntity="Permission")
     * @ORM\JoinTable(name="group_has_permission",
     *      joinColumns={@ORM\JoinColumn(name="group_id", referencedColumnName="id")},
     *      inverseJoinColumns={@ORM\JoinColumn(name="permission_id", referencedColumnName="id")}
     * )
     */
    protected $permissions;
  
    public function __construct()
    {
      $this-&gt;permissions = new ArrayCollection();
    }
  }
  
  /**
   * @ORM\Entity
   */
  class Permission {}
  </code></pre>
  
  <p>It's just an example, but i'm confused. I need another entity probably called "group_has_permission" with two fields: group_id and permission_id, right? Or am i wrong?</p>