I have 3 entities:
- Song
- Artist
- Genre
One song can have multiple genres and vice versa. A song can also have multiple artists and vice versa.
That's why I'm trying to create two many-to-many relationships. However, when generating the Entity clases, the first of the two is always 'overridden' by the second one and no variable or accessors are created for that one..
Here's my yaml: (updated)
Foo\BarBundle\Entity\Song: type: entity table: song id: id: type: integer generator: strategy: AUTO fields: title: type: string length: 300 mime_type: type: string length: 20 filesize: type: integer length: 20 length: type: string length: 20 created_at: type: datetime gedmo: timestampable: on: create manyToOne: user: targetEntity: Spotaset\UserBundle\Entity\User inversedBy: songs manyToMany: genres: targetEntity: Genre inversedBy: songs manyToMany: artists: targetEntity: Artist inversedBy: songs Foo\BarBundle\Entity\Artist: type: entity table: artist id: id: type: integer generator: strategy: AUTO fields: name: type: string length: 100 unique: true manyToMany: songs: targetEntity: Song mappedBy: artistss Foo\BarBundle\Entity\Genre: type: entity table: genre id: id: type: integer generator: strategy: AUTO fields: name: type: string length: 100 unique: true manyToMany: songs: targetEntity: Song mappedBy: genres I don't know a lot about relational databases so I don't know wether this is a bug or that this design is just bad in general..
All help is greatly appreciated!