SonataUserBundle - Neither property nor methods exist
问题 I have installed Sonata User, Admin, Media and a few other bundles successfully. I want to add profile pic to user entity so I've added a $profilePic property to it (with setter and getter) as follow: /** * @ORM\OneToOne(targetEntity="Application\Sonata\MediaBundle\Entity\Media",cascade={"persist"}) * @ORM\JoinColumn(name="profilePic_id", referencedColumnName="id") **/ protected $profilePic; public function getProfilePic() { return $this->profilePic; } public function setProfilePic(