/** * 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->aProfile !== null && $this->profile_id !== $this->aProfile->getId()) { $this->aProfile = null; } if ($this->aResource !== null && $this->resource_id !== $this->aResource->getId()) { $this->aResource = null; } }
/** * 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->aProfile !== null && $this->profile_id !== $this->aProfile->getId()) { $this->aProfile = null; } if ($this->aModule !== null && $this->module_id !== $this->aModule->getId()) { $this->aModule = null; } }