/** * Declares an association between this object and a ChildVariation object. * * @param ChildVariation $v * @return $this|\App\Propel\ProductVariation The current object (for fluent API support) * @throws PropelException */ public function setVariation(ChildVariation $v = null) { if ($v === null) { $this->setVariationId(NULL); } else { $this->setVariationId($v->getVariationId()); } $this->aVariation = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildVariation object, it will not be re-added. if ($v !== null) { $v->addProductVariation($this); } return $this; }
/** * Filter the query by a related \App\Propel\Variation object * * @param \App\Propel\Variation|ObjectCollection $variation 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 ChildVariationI18nQuery The current query, for fluid interface */ public function filterByVariation($variation, $comparison = null) { if ($variation instanceof \App\Propel\Variation) { return $this->addUsingAlias(VariationI18nTableMap::COL_VARIATION_ID, $variation->getVariationId(), $comparison); } elseif ($variation instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(VariationI18nTableMap::COL_VARIATION_ID, $variation->toKeyValue('PrimaryKey', 'VariationId'), $comparison); } else { throw new PropelException('filterByVariation() only accepts arguments of type \\App\\Propel\\Variation or Collection'); } }
/** * Exclude object from result * * @param ChildVariation $variation Object to remove from the list of results * * @return $this|ChildVariationQuery The current query, for fluid interface */ public function prune($variation = null) { if ($variation) { $this->addUsingAlias(VariationTableMap::COL_VARIATION_ID, $variation->getVariationId(), Criteria::NOT_EQUAL); } return $this; }