How to access repository methods for an entity in symfony2?
问题 I am stuck with a problem please help me with it. Here is the scenarario: I have an entity "User" and corresponding repository "UserRepository", inside my entity there are only getter and setter methods. All custom queries I have written to UserRepository. Now inside my UserController I am trying to access repository methods which I am not able to do so. e.g. User entity: class User { ... public function getId() { return $this->id; } public function setId($id) { return $this->id=$id; } public