I have: Symfony 2, UserBundle (there is no controller, only Entities User, Roles and not used entity Data ).
I want (controller): $user = $this->getUser(); // return a User object (\UserBundle\Entity\User) $user->getData(); // there is a custom method in User object that get a data from Database (table UserData, for example)
How can i do that?
Where should be my "getData" function?