Symfony ManyToOne relationship getter returns empty object
问题 I'll simplifly my code, I have te next: Doctor entity: use ...\...\Entity\Paciente; class Doctor extends Usuario { public function __construct() { ... $this->pacientes = new ArrayCollection(); ... } /** * Número de colegiado - numColegiado * * @var string * * @ORM\Column(name="numColegiado", type="string", length=255, unique=true) */ protected $numColegiado; /** * @ORM\OneToMany(targetEntity="Paciente", mappedBy="doctor") * @var \Doctrine\Common\Collections\ArrayCollection */ private