I have a Symfony2 project related to a database. For each table, I have an entity.
Now I'm trying to connect one Entity to another using ManyToOne.
Here is the problem:
I have two entities: user and workstation.
In User Entity, I have:
protected $workplace; public function setWorkplace($workplace) { $this->workplace = $workplace; } public function getWorkplace() { return $this->workplace; }
In the Workplace object, I:
protected $place; public function setPlace($place) { $this->place = $place; } public function getPlace() { return $this->place; }
And with this, I get an exception:
Neither property "workplace" nor method "getWorkplace()" nor method "isWorkplace()" exists in class "SciForum\Version2Bundle\Entity\Workplace"
How can this be solved. Thank you very much.
source share