/**
  * Declares an association between this object and a ChildCustomer object.
  *
  * @param                  ChildCustomer $v
  * @return                 \CustomerFamily\Model\CustomerCustomerFamily The current object (for fluent API support)
  * @throws PropelException
  */
 public function setCustomer(ChildCustomer $v = null)
 {
     if ($v === null) {
         $this->setCustomerId(NULL);
     } else {
         $this->setCustomerId($v->getId());
     }
     $this->aCustomer = $v;
     // Add binding for other direction of this 1:1 relationship.
     if ($v !== null) {
         $v->setCustomerCustomerFamily($this);
     }
     return $this;
 }
 /**
  * Filter the query by a related \CustomerFamily\Model\Thelia\Model\Customer object
  *
  * @param \CustomerFamily\Model\Thelia\Model\Customer|ObjectCollection $customer 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 filterByCustomer($customer, $comparison = null)
 {
     if ($customer instanceof \CustomerFamily\Model\Thelia\Model\Customer) {
         return $this->addUsingAlias(CustomerCustomerFamilyTableMap::CUSTOMER_ID, $customer->getId(), $comparison);
     } elseif ($customer instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(CustomerCustomerFamilyTableMap::CUSTOMER_ID, $customer->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByCustomer() only accepts arguments of type \\CustomerFamily\\Model\\Thelia\\Model\\Customer or Collection');
     }
 }