I have a Many to Many relationship in Symfony 2. Diagram below.
https://i.stack.imgur.com/x6AYs.png
From Tema Entity i can get all Topico records related using this ORM definition
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Application\RiesgoBundle\Entity\Topico", inversedBy="tema")
* @ORM\JoinTable(name="tema_topico",
* joinColumns={
* @ORM\JoinColumn(name="tema", referencedColumnName="id")
* },
* inverseJoinColumns={
* @ORM\JoinColumn(name="topico", referencedColumnName="id")
* }
* )
*/
private $topico;
And using this method
/**
* Get topico
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getTopico()
{
return $this->topico;
}
However, i don't know how to access to "impacto" and "ocurrencia" values stored on tema_topico table. Is there a way to do this using the Entity Manager?