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