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