/** * 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->aProduct !== null && $this->product_id !== $this->aProduct->getId()) { $this->aProduct = null; } if ($this->aCategory !== null && $this->category_id !== $this->aCategory->getId()) { $this->aCategory = 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->aSale !== null && $this->sale_id !== $this->aSale->getId()) { $this->aSale = null; } if ($this->aProduct !== null && $this->product_id !== $this->aProduct->getId()) { $this->aProduct = null; } if ($this->aAttributeAv !== null && $this->attribute_av_id !== $this->aAttributeAv->getId()) { $this->aAttributeAv = 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->aProduct !== null && $this->product_id !== $this->aProduct->getId()) { $this->aProduct = null; } if ($this->aContent !== null && $this->content_id !== $this->aContent->getId()) { $this->aContent = 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->aProductRelatedByProductId !== null && $this->product_id !== $this->aProductRelatedByProductId->getId()) { $this->aProductRelatedByProductId = null; } if ($this->aProductRelatedByAccessory !== null && $this->accessory !== $this->aProductRelatedByAccessory->getId()) { $this->aProductRelatedByAccessory = 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->aProduct !== null && $this->product_id !== $this->aProduct->getId()) { $this->aProduct = null; } if ($this->aFeature !== null && $this->feature_id !== $this->aFeature->getId()) { $this->aFeature = null; } if ($this->aFeatureAv !== null && $this->feature_av_id !== $this->aFeatureAv->getId()) { $this->aFeatureAv = 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->aProduct !== null && $this->id !== $this->aProduct->getId()) { $this->aProduct = 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->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; } }
public static function makeProductUniqueId($locale, \Thelia\Model\Base\Product $product) { //concatenate locale + ref return $locale . '_' . $product->getId(); }