Listing 33.3. Właściwość i adnotacja definiujące relację n:m w klasie Aktor
class Aktor
{
    ...

    /**
     * @ORM\ManyToMany(targetEntity="Film", mappedBy="aktorzy")
     */
    protected $filmy;

    ...
}