/** * Checks and repairs the internal consistency of the object. * * This method is executed after an already-instantiated object is re-hydrated * from the database. It exists to check any foreign keys to make sure that * the objects related to the current object are correct based on foreign key. * * You can override this method in the stub class, but you should always invoke * the base method from the overridden method (i.e. parent::ensureConsistency()), * in case your model changes. * * @throws PropelException */ public function ensureConsistency() { if ($this->aArea !== null && $this->area_id !== $this->aArea->getId()) { $this->aArea = null; } if ($this->aSocolissimoDeliveryMode !== null && $this->delivery_mode_id !== $this->aSocolissimoDeliveryMode->getId()) { $this->aSocolissimoDeliveryMode = null; } }
public function removeArea(Area $area) { if (array_key_exists($area->getId(), $this->areas)) { unset($this->areas[$area->getId()]); } }
/** * Checks and repairs the internal consistency of the object. * * This method is executed after an already-instantiated object is re-hydrated * from the database. It exists to check any foreign keys to make sure that * the objects related to the current object are correct based on foreign key. * * You can override this method in the stub class, but you should always invoke * the base method from the overridden method (i.e. parent::ensureConsistency()), * in case your model changes. * * @throws PropelException */ public function ensureConsistency() { if ($this->aArea !== null && $this->area_id !== $this->aArea->getId()) { $this->aArea = null; } }