ok, eu escrevo de outra forma:
use pode usar este mapeamento:
Filme:
Movie:
type: entity
table: movie
id:
id:
type: integer
generator: { strategy: AUTO }
fields:
title: ~
createdAt:
type: datetime
oneToMany:
roles:
targetEntity: Role
mappedBy: movie
Artista:
Artist:
type: entity
table: artist
id:
id:
type: integer
generator: { strategy: AUTO }
fields:
fname: ~
lname: ~
birthDate:
type: datetime
#other fields for this entity
Função:
Role:
type: entity
table: role
id:
id:
type: integer
generator: { strategy: AUTO }
fields:
name: ~
manyToMany:
artist:
targetEntity: Artist
manyToOne:
movie:
targetEntity: Movie
inversedBy: roles