/** * Filter the query by a related CategorieMatiere object * * @param CategorieMatiere|PropelCollection $categorieMatiere The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return MatiereQuery The current query, for fluid interface */ public function filterByCategorieMatiere($categorieMatiere, $comparison = null) { if ($categorieMatiere instanceof CategorieMatiere) { return $this ->addUsingAlias(MatierePeer::CATEGORIE_ID, $categorieMatiere->getId(), $comparison); } elseif ($categorieMatiere instanceof PropelCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this ->addUsingAlias(MatierePeer::CATEGORIE_ID, $categorieMatiere->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByCategorieMatiere() only accepts arguments of type CategorieMatiere or PropelCollection'); } }