/** * Filter the query by a related \SoColissimo\Model\Thelia\Model\Area object * * @param \SoColissimo\Model\Thelia\Model\Area|ObjectCollection $area The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildSocolissimoPriceQuery The current query, for fluid interface */ public function filterByArea($area, $comparison = null) { if ($area instanceof \SoColissimo\Model\Thelia\Model\Area) { return $this->addUsingAlias(SocolissimoPriceTableMap::AREA_ID, $area->getId(), $comparison); } elseif ($area instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(SocolissimoPriceTableMap::AREA_ID, $area->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByArea() only accepts arguments of type \\SoColissimo\\Model\\Thelia\\Model\\Area or Collection'); } }
/** * Declares an association between this object and a ChildArea object. * * @param ChildArea $v * @return \SoColissimo\Model\SocolissimoPrice The current object (for fluent API support) * @throws PropelException */ public function setArea(ChildArea $v = null) { if ($v === null) { $this->setAreaId(NULL); } else { $this->setAreaId($v->getId()); } $this->aArea = $v; // Add binding for other direction of this n:n relationship. // If this object has already been added to the ChildArea object, it will not be re-added. if ($v !== null) { $v->addSocolissimoPrice($this); } return $this; }