/** * Exclude object from result * * @param ChildCustomer $customer Object to remove from the list of results * * @return $this|ChildCustomerQuery The current query, for fluid interface */ public function prune($customer = null) { if ($customer) { $this->addUsingAlias(CustomerTableMap::COL_ID, $customer->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * Declares an association between this object and a ChildCustomer object. * * @param ChildCustomer $v * @return $this|\Project 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 n:n relationship. // If this object has already been added to the ChildCustomer object, it will not be re-added. if ($v !== null) { $v->addProject($this); } return $this; }
/** * Filter the query by a related \Customer object * * @param \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 * * @throws \Propel\Runtime\Exception\PropelException * * @return ChildProjectQuery The current query, for fluid interface */ public function filterByCustomer($customer, $comparison = null) { if ($customer instanceof \Customer) { return $this->addUsingAlias(ProjectTableMap::COL_CUSTOMER_ID, $customer->getId(), $comparison); } elseif ($customer instanceof ObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(ProjectTableMap::COL_CUSTOMER_ID, $customer->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByCustomer() only accepts arguments of type \\Customer or Collection'); } }