Example #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->aTaxRule !== null && $this->tax_rule_id !== $this->aTaxRule->getId()) {
         $this->aTaxRule = null;
     }
     if ($this->aCountry !== null && $this->country_id !== $this->aCountry->getId()) {
         $this->aCountry = null;
     }
     if ($this->aState !== null && $this->state_id !== $this->aState->getId()) {
         $this->aState = null;
     }
     if ($this->aTax !== null && $this->tax_id !== $this->aTax->getId()) {
         $this->aTax = null;
     }
 }
Example #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->aTaxRule !== null && $this->tax_rule_id !== $this->aTaxRule->getId()) {
         $this->aTaxRule = null;
     }
     if ($this->aTemplate !== null && $this->template_id !== $this->aTemplate->getId()) {
         $this->aTemplate = null;
     }
     if ($this->aBrand !== null && $this->brand_id !== $this->aBrand->getId()) {
         $this->aBrand = null;
     }
 }
Example #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->aTaxRule !== null && $this->id !== $this->aTaxRule->getId()) {
         $this->aTaxRule = null;
     }
 }