I get the entity Memberfrom the entity manager, did var_dump, everything is fine, except for the manyToOne s relationship Family, so I tried var_dump($member->getFamily());, and, surprisingly, the only correct value was the family identifier, all other properties were null (which does not apply to the database .. .)
Here is my dick.
/**
* @var Family
*
* @ORM\ManyToOne(targetEntity="AppBundle\Entity\Family", inversedBy="members")
* @ORM\JoinColumn(name="family_id", referencedColumnName="id")
*/
private $family;
And the stuff of my family essence
/**
* @ORM\OneToMany(targetEntity="AppBundle\Entity\Member", mappedBy="family", cascade={"persist", "remove"})
*/
private $members;
All receivers and setters are generated by Doctrine. It is just that only id seems to be hydrated, and not the rest. Any idea?
EDIT: var_dump result
private 'family' =>
object(Proxies\__CG__\AppBundle\Entity\Family)[427]
public '__initializer__' =>
object(Closure)[405]
public '__cloner__' =>
object(Closure)[406]
public '__isInitialized__' => boolean false
private 'id' (AppBundle\Entity\Family) => int 1
private 'members' (AppBundle\Entity\Family) => null
private 'adress' (AppBundle\Entity\Family) => null
protected 'telephone' => null
protected 'email' => null
private 'nom' (AppBundle\Entity\Family) => null
private 'isValid' (AppBundle\Entity\Family) => null
source
share