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