Exemple #1
0
 /**
  * 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;
     }
     if ($this->aCart !== null && $this->cart_id !== $this->aCart->getId()) {
         $this->aCart = null;
     }
 }
Exemple #2
0
 /**
  * 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->aCart !== null && $this->cart_id !== $this->aCart->getId()) {
         $this->aCart = null;
     }
     if ($this->aProduct !== null && $this->product_id !== $this->aProduct->getId()) {
         $this->aProduct = null;
     }
     if ($this->aProductSaleElements !== null && $this->product_sale_elements_id !== $this->aProductSaleElements->getId()) {
         $this->aProductSaleElements = null;
     }
 }