Example #1
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aOrder) {
         $this->aOrder->removeOrderProduct($this);
     }
     if (null !== $this->aProduct) {
         $this->aProduct->removeOrderProduct($this);
     }
     if (null !== $this->aProductVariation) {
         $this->aProductVariation->removeOrderProduct($this);
     }
     $this->order_product_id = null;
     $this->order_id = null;
     $this->product_id = null;
     $this->product_variation_id = null;
     $this->product_quantity = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Example #2
0
 /**
  * Filter the query by a related \App\Propel\ProductVariation object
  *
  * @param \App\Propel\ProductVariation|ObjectCollection $productVariation The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildOrderProductQuery The current query, for fluid interface
  */
 public function filterByProductVariation($productVariation, $comparison = null)
 {
     if ($productVariation instanceof \App\Propel\ProductVariation) {
         return $this->addUsingAlias(OrderProductTableMap::COL_PRODUCT_VARIATION_ID, $productVariation->getProductVariationId(), $comparison);
     } elseif ($productVariation instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(OrderProductTableMap::COL_PRODUCT_VARIATION_ID, $productVariation->toKeyValue('PrimaryKey', 'ProductVariationId'), $comparison);
     } else {
         throw new PropelException('filterByProductVariation() only accepts arguments of type \\App\\Propel\\ProductVariation or Collection');
     }
 }
Example #3
0
 /**
  * Filter the query by a related \App\Propel\ProductVariation object
  *
  * @param \App\Propel\ProductVariation|ObjectCollection $productVariation the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildVariationQuery The current query, for fluid interface
  */
 public function filterByProductVariation($productVariation, $comparison = null)
 {
     if ($productVariation instanceof \App\Propel\ProductVariation) {
         return $this->addUsingAlias(VariationTableMap::COL_VARIATION_ID, $productVariation->getVariationId(), $comparison);
     } elseif ($productVariation instanceof ObjectCollection) {
         return $this->useProductVariationQuery()->filterByPrimaryKeys($productVariation->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByProductVariation() only accepts arguments of type \\App\\Propel\\ProductVariation or Collection');
     }
 }
 /**
  * Exclude object from result
  *
  * @param   ChildProductVariation $productVariation Object to remove from the list of results
  *
  * @return $this|ChildProductVariationQuery The current query, for fluid interface
  */
 public function prune($productVariation = null)
 {
     if ($productVariation) {
         $this->addUsingAlias(ProductVariationTableMap::COL_PRODUCT_VARIATION_ID, $productVariation->getProductVariationId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Example #5
0
 /**
  * @param ChildProductVariation $productVariation The ChildProductVariation object to add.
  */
 protected function doAddProductVariation(ChildProductVariation $productVariation)
 {
     $this->collProductVariations[] = $productVariation;
     $productVariation->setVariation($this);
 }