/** * 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->aCustomer !== null && $this->customer_id !== $this->aCustomer->getId()) { $this->aCustomer = null; } if ($this->aOrderAddressRelatedByInvoiceOrderAddressId !== null && $this->invoice_order_address_id !== $this->aOrderAddressRelatedByInvoiceOrderAddressId->getId()) { $this->aOrderAddressRelatedByInvoiceOrderAddressId = null; } if ($this->aOrderAddressRelatedByDeliveryOrderAddressId !== null && $this->delivery_order_address_id !== $this->aOrderAddressRelatedByDeliveryOrderAddressId->getId()) { $this->aOrderAddressRelatedByDeliveryOrderAddressId = null; } if ($this->aCurrency !== null && $this->currency_id !== $this->aCurrency->getId()) { $this->aCurrency = null; } if ($this->aModuleRelatedByPaymentModuleId !== null && $this->payment_module_id !== $this->aModuleRelatedByPaymentModuleId->getId()) { $this->aModuleRelatedByPaymentModuleId = null; } if ($this->aModuleRelatedByDeliveryModuleId !== null && $this->delivery_module_id !== $this->aModuleRelatedByDeliveryModuleId->getId()) { $this->aModuleRelatedByDeliveryModuleId = null; } if ($this->aOrderStatus !== null && $this->status_id !== $this->aOrderStatus->getId()) { $this->aOrderStatus = null; } if ($this->aLang !== null && $this->lang_id !== $this->aLang->getId()) { $this->aLang = 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->aCustomerTitle !== null && $this->title_id !== $this->aCustomerTitle->getId()) { $this->aCustomerTitle = null; } if ($this->aLangModel !== null && $this->lang_id !== $this->aLangModel->getId()) { $this->aLangModel = null; } }