I have three entities in my project.
First Entity:
class Entity1
{
/**
* @ORM\ManyToMany(targetEntity="App\MyBundle\Entity\Entity2", inversedBy="i")
*
*/
protected $j;
}
Second Entity:
class Entity2
{
/**
* @ORM\ManyToMany(targetEntity="App\MyBundle\Entity\Entity1", mappedBy="j")
*/
protected $i;
}
Now i have a manyToMany connection between entity 1 and entity 2, the table look like this.
Tablename: entity1_entity2
Fields: entity1_id, entity2_id
I would like to create a third entity and connect this to the related table entity1_entity2 with a oneToMany relation? How can i do this? Is this use case possible?