예제 #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->aCoupon !== null && $this->coupon_id !== $this->aCoupon->getId()) {
         $this->aCoupon = null;
     }
     if ($this->aCustomer !== null && $this->customer_id !== $this->aCustomer->getId()) {
         $this->aCustomer = null;
     }
 }
예제 #2
0
파일: Order.php 프로젝트: shirone/thelia
 /**
  * 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;
     }
 }
예제 #3
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->id !== $this->aCustomer->getId()) {
         $this->aCustomer = null;
     }
 }
예제 #4
0
파일: Cart.php 프로젝트: alex63530/thelia
 /**
  * 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->aAddressRelatedByAddressDeliveryId !== null && $this->address_delivery_id !== $this->aAddressRelatedByAddressDeliveryId->getId()) {
         $this->aAddressRelatedByAddressDeliveryId = null;
     }
     if ($this->aAddressRelatedByAddressInvoiceId !== null && $this->address_invoice_id !== $this->aAddressRelatedByAddressInvoiceId->getId()) {
         $this->aAddressRelatedByAddressInvoiceId = null;
     }
     if ($this->aCurrency !== null && $this->currency_id !== $this->aCurrency->getId()) {
         $this->aCurrency = null;
     }
 }
예제 #5
0
파일: Address.php 프로젝트: margery/thelia
 /**
  * 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->aCustomerTitle !== null && $this->title_id !== $this->aCustomerTitle->getId()) {
         $this->aCustomerTitle = null;
     }
     if ($this->aCountry !== null && $this->country_id !== $this->aCountry->getId()) {
         $this->aCountry = null;
     }
 }