Unidirectional many-to-many behavior and needed entities in Doctrine/Symfony 2
===

So, i have the following structure of entities: 

    /**
     * @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->permissions = new ArrayCollection();
      }
    }

    /**
     * @ORM\Entity
     */
    class Permission {}

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?