public function addHabitant(LivesIn $livesIn) { $this->habitants->add($livesIn); }
public function setCity(City $city, $since = null) { $since = null !== $since ? $since : 123; $rel = new LivesIn($this, $city, $since); $this->setLivesIn($rel); $city->addHabitant($rel); }