protected function _updateExisting() { if ($this->purpose_id != $this->_initial['purpose_id']) { $this->purpose = TripPurpose::getValueById($this->purpose_id); } if ($this->country_id != $this->_initial['country_id']) { $this->country = Country::getValueById($this->country_id); } if ($this->with_id != $this->_initial['with_id']) { $this->with = TripWith::getValueById($this->with_id); } if ($this->companion_id != $this->_initial['companion_id']) { $this->companion = TripCompanion::getValueById($this->companion_id); } if ($this->end_at < $this->start_at) { $t = $this->end_at; $this->end_at = $this->start_at; $this->start_at = $t; } }