/** * Filter the query by a related \Thelia\Model\Order object * * @param \Thelia\Model\Order|ObjectCollection $order the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildCustomerQuery The current query, for fluid interface */ public function filterByOrder($order, $comparison = null) { if ($order instanceof \Thelia\Model\Order) { return $this->addUsingAlias(CustomerTableMap::ID, $order->getCustomerId(), $comparison); } elseif ($order instanceof ObjectCollection) { return $this->useOrderQuery()->filterByPrimaryKeys($order->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByOrder() only accepts arguments of type \\Thelia\\Model\\Order or Collection'); } }