예제 #1
0
 /**
  * Filter the query by a related \App\Propel\ProductVariationType object
  *
  * @param \App\Propel\ProductVariationType|ObjectCollection $productVariationType 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 ChildProductVariationQuery The current query, for fluid interface
  */
 public function filterByProductVariationType($productVariationType, $comparison = null)
 {
     if ($productVariationType instanceof \App\Propel\ProductVariationType) {
         return $this->addUsingAlias(ProductVariationTableMap::COL_PRODUCT_VARIATION_TYPE_ID, $productVariationType->getProductVariationTypeId(), $comparison);
     } elseif ($productVariationType instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ProductVariationTableMap::COL_PRODUCT_VARIATION_TYPE_ID, $productVariationType->toKeyValue('PrimaryKey', 'ProductVariationTypeId'), $comparison);
     } else {
         throw new PropelException('filterByProductVariationType() only accepts arguments of type \\App\\Propel\\ProductVariationType or Collection');
     }
 }
예제 #2
0
 /**
  * Declares an association between this object and a ChildProductVariationType object.
  *
  * @param  ChildProductVariationType $v
  * @return $this|\App\Propel\ProductVariation The current object (for fluent API support)
  * @throws PropelException
  */
 public function setProductVariationType(ChildProductVariationType $v = null)
 {
     if ($v === null) {
         $this->setProductVariationTypeId(NULL);
     } else {
         $this->setProductVariationTypeId($v->getProductVariationTypeId());
     }
     $this->aProductVariationType = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildProductVariationType object, it will not be re-added.
     if ($v !== null) {
         $v->addProductVariation($this);
     }
     return $this;
 }
 /**
  * Exclude object from result
  *
  * @param   ChildProductVariationType $productVariationType Object to remove from the list of results
  *
  * @return $this|ChildProductVariationTypeQuery The current query, for fluid interface
  */
 public function prune($productVariationType = null)
 {
     if ($productVariationType) {
         $this->addUsingAlias(ProductVariationTypeTableMap::COL_PRODUCT_VARIATION_TYPE_ID, $productVariationType->getProductVariationTypeId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }