/**
  * Declares an association between this object and a ChildCustomerFamily object.
  *
  * @param                  ChildCustomerFamily $v
  * @return                 \CustomerFamily\Model\CustomerCustomerFamily The current object (for fluent API support)
  * @throws PropelException
  */
 public function setCustomerFamily(ChildCustomerFamily $v = null)
 {
     if ($v === null) {
         $this->setCustomerFamilyId(NULL);
     } else {
         $this->setCustomerFamilyId($v->getId());
     }
     $this->aCustomerFamily = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildCustomerFamily object, it will not be re-added.
     if ($v !== null) {
         $v->addCustomerCustomerFamily($this);
     }
     return $this;
 }
Пример #2
0
 /**
  * @return int
  */
 public function getId()
 {
     return $this->customerFamily->getId();
 }
Пример #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildCustomerFamily $customerFamily Object to remove from the list of results
  *
  * @return ChildCustomerFamilyQuery The current query, for fluid interface
  */
 public function prune($customerFamily = null)
 {
     if ($customerFamily) {
         $this->addUsingAlias(CustomerFamilyTableMap::ID, $customerFamily->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
 /**
  * Filter the query by a related \CustomerFamily\Model\CustomerFamily object
  *
  * @param \CustomerFamily\Model\CustomerFamily|ObjectCollection $customerFamily The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildCustomerCustomerFamilyQuery The current query, for fluid interface
  */
 public function filterByCustomerFamily($customerFamily, $comparison = null)
 {
     if ($customerFamily instanceof \CustomerFamily\Model\CustomerFamily) {
         return $this->addUsingAlias(CustomerCustomerFamilyTableMap::CUSTOMER_FAMILY_ID, $customerFamily->getId(), $comparison);
     } elseif ($customerFamily instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(CustomerCustomerFamilyTableMap::CUSTOMER_FAMILY_ID, $customerFamily->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCustomerFamily() only accepts arguments of type \\CustomerFamily\\Model\\CustomerFamily or Collection');
     }
 }