Similarly to common assocation, directions on many to many assoc are handled by aliases.
As you can see in following examples, based on these aliases you can control how your association should looks like. It's because Doctrine2 handles associations based on the aliases.
In all next examples I will use following model:

In case you fill only alias to inverse entity, you will get unidirectional (one-way) association heading from first to second entity. As export, you will get:
@ORM\ManyToMany(targetEntity="First")
@ORM\JoinTable(
name="mn",
joinColumns={@ORM\JoinColumn(name="second_id", referencedColumnName="id", nullable=false)},
inverseJoinColumns={@ORM\JoinColumn(name="first_id", referencedColumnName="id", nullable=false)}
)

In case you fill only alias to owner entity, you will get incorrect unidirectional (one-way) association heading from second to first. I'm writing incorrect, because this isn't correct Doctrine2 configuration and based on the ERD modelling it's not possible to create such association without helper table. In this situation you will get:
@ORM\ManyToMany(targetEntity="Second", mappedBy=)

In case you fill both aliases, you get bidirectional association (two-way) between first and second entity. In this case, Skipper exports annotations to both entities:
SecondEntity:
@ORM\ManyToMany(targetEntity="First", inversedBy="second")
@ORM\JoinTable(
name="mn",
joinColumns={@ORM\JoinColumn(name="second_id", referencedColumnName="id", nullable=false)},
inverseJoinColumns={@ORM\JoinColumn(name="first_id", referencedColumnName="id", nullable=false)}
)
private $first;
FirstEntity:
@ORM\ManyToMany(targetEntity="Second", mappedBy="first")
private $second;

Hope these examples will help you understand the concept of creating many to many association on our application.